Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,21 @@ on:
pull_request:
branches: [ main ]

permissions:
contents: read
pages: write
id-token: write

env:
CARGO_TERM_COLOR: always

jobs:
docs:
name: Documentation
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4

Expand All @@ -41,10 +49,17 @@ jobs:
cargo deadlinks --check-http
continue-on-error: true

- name: Deploy documentation to GitHub Pages
- name: Setup Pages
if: github.ref == 'refs/heads/main'
uses: actions/configure-pages@v4

- name: Upload artifact
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc
force_orphan: true
path: ./target/doc

- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
id: deployment
uses: actions/deploy-pages@v4