From fdb7b0ec3fe35fa767b5e5f805503782e3d16b35 Mon Sep 17 00:00:00 2001 From: Bennett Petzold Date: Sat, 10 Feb 2024 14:37:05 -0500 Subject: [PATCH 1/2] Deliberately Empty Test Commit From f3ea63a6095f3c9cf877849b1a334c6483b0bc8d Mon Sep 17 00:00:00 2001 From: Bennett Petzold Date: Sat, 10 Feb 2024 14:44:37 -0500 Subject: [PATCH 2/2] Combine into one GitHub Action --- .github/workflows/build-docs.yml | 65 +++++++++++++------------------- 1 file changed, 27 insertions(+), 38 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index ab0d9db058b..f405bb64c20 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -7,42 +7,7 @@ env: CARGO_TERM_COLOR: always jobs: - build_docs: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Update Ubuntu Packages - run: sudo apt-get update - - - uses: awalsh128/cache-apt-pkgs-action@v1 - with: - packages: llvm \ - clang \ - libclang-dev \ - libopencv-dev - - - uses: dtolnay/rust-toolchain@stable - with: - components: clippy - - uses: Swatinem/rust-cache@v2 - - - name: Build docs - run: cargo doc --all-features - - - name: Add redirect - run: echo '' > target/doc/index.html - - name: Remove lock file - run: rm target/doc/.lock - - - uses: actions/upload-pages-artifact@v3 - with: - path: target/doc - - deploy: - needs: build_docs - + doc_deploy: permissions: pages: write id-token: write @@ -51,12 +16,36 @@ jobs: name: github-pages url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 + + - name: Update Ubuntu Packages + run: sudo apt-get update + + - uses: awalsh128/cache-apt-pkgs-action@v1 + with: + packages: llvm \ + clang \ + libclang-dev \ + libopencv-dev + + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy + - uses: Swatinem/rust-cache@v2 + + - name: Build docs + run: cargo doc --all-features + + - name: Add redirect + run: echo '' > target/doc/index.html + - name: Remove lock file + run: rm target/doc/.lock + - name: Deploy to GitHub Pages id: deployment uses: JamesIves/github-pages-deploy-action@v4 with: - folder: . + folder: target/doc target-folder: ${{ github.ref_name }}