Documentation #14
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: Documentation | |
on: | |
workflow_run: | |
workflows: ["Testing"] | |
branches: [development] | |
types: | |
- completed | |
env: | |
CARGO_INCREMENTAL: 0 | |
CARGO_NET_RETRY: 10 | |
RUSTFLAGS: "-D warnings -W unreachable-pub" | |
RUSTUP_MAX_RETRIES: 10 | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
run: rustup update --no-self-update stable | |
- name: Build Documentation | |
run: cargo doc --all --no-deps | |
- name: Add redirect | |
run: echo '<meta http-equiv="refresh" content="0;url=mil_std_1553b/index.html">' > target/doc/index.html | |
- 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: Deploy artifacts | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "./target/doc" | |
deploy: | |
name: Deploy | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |