name: Deploy Rustdoc to GitHub Pages
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build-docs:
name: "Publishing GitHub Pages"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
- uses: taiki-e/install-action@v2
with:
tool: just
- uses: Swatinem/rust-cache@v2
- run: just doc-gh-pages
- name: Add index.html
run: |
echo '<meta http-equiv="refresh" content="0; url=./cargo_sync_rdme/">' > target/doc/index.html
- uses: actions/upload-pages-artifact@v5
with:
path: target/doc
deploy-docs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: [build-docs]
steps:
- id: deployment
uses: actions/deploy-pages@v5