fix: file permissions to deploy #6
This file contains 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: Docs | |
on: | |
workflow_dispatch: # enable manual dispatch | |
push: | |
branches: | |
- main | |
jobs: | |
rustdoc: | |
name: Rustdoc | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
- name: Create rustdoc | |
run: cargo doc --document-private-items | |
- name: Fix permissions | |
run: | | |
chmod -c -R +rX "target/doc" | while read line; do | |
echo "::warning title=Invalid file permissions automatically fixed::$line" | |
done | |
- name: Upload artifacts | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: target/doc | |
deploy: | |
needs: rustdoc | |
permissions: | |
pages: write | |
id-token: write | |
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 |