Skip to content

Commit

Permalink
Publish cargo doc assets to GH Pages (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
neysofu authored Jul 7, 2023
1 parent 7b82e6e commit 8e4cc3e
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,29 @@ jobs:
echo "Curl failed, retrying in 5 seconds..."
sleep 5
done
cargo-doc-artifact:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
# The artifact tends to become quite large with all the dependencies, so
# we don't include them in the docs.
- run: cargo doc --no-deps
- uses: actions/upload-pages-artifact@v1
with:
path: target/doc
deploy:
needs: cargo-doc-artifact
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 8e4cc3e

Please sign in to comment.