ci(deps): bump actions/configure-pages from 5 to 6 (#81) #102
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Documentation | |
| on: | |
| push: | |
| branches: ["main", "devel"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| if: ${{ github.actor == 'bgreenwell' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Build documentation | |
| run: cargo doc --no-deps | |
| - name: Create redirect page | |
| run: echo '<meta http-equiv="refresh" content="0; url=doxx">' > target/doc/index.html | |
| - name: Setup Pages | |
| id: pages | |
| uses: actions/configure-pages@v6 | |
| continue-on-error: true | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: "./target/doc" | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: success() | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| continue-on-error: true | |
| - name: Pages deployment status | |
| run: | | |
| if [ "${{ steps.deployment.outcome }}" == "failure" ]; then | |
| echo "::warning::GitHub Pages deployment failed. Please enable Pages in repository settings:" | |
| echo "::warning::1. Go to Settings > Pages" | |
| echo "::warning::2. Set Source to 'GitHub Actions'" | |
| echo "::warning::3. Re-run this workflow" | |
| else | |
| echo "Documentation deployed successfully!" | |
| fi |