Fixes this error, by using chmod
to make all files executable.
Last active
July 30, 2023 12:46
-
-
Save antonengelhardt/f44815b91946440a2ac2c60976638686 to your computer and use it in GitHub Desktop.
Rust Docs for GitHub Pages
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: Documentation | |
on: | |
push: | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install rustup | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Generate documentation | |
uses: actions-rs/cargo@v1 | |
with: | |
command: doc | |
args: --document-private-items | |
- name: Fix file permissions | |
shell: sh | |
run: | | |
chmod -c -R +rX "target/doc" | | |
while read line; do | |
echo "::warning title=Invalid file permissions automatically fixed::$line" | |
done | |
- name: Generate index.html file | |
run: | | |
echo "<meta http-equiv=refresh content=0;url=wasm_oidc_plugin/index.html>" > target/doc/index.html | |
- name: Upload documentation | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ./target/doc | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.pages.outputs.page_url }} | |
steps: | |
- name: Deploy documentation | |
id: pages | |
uses: actions/deploy-pages@v2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment