Skip to content

Documentation

Documentation #13

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