Skip to content

Documentation

Documentation #49

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: |
mkdir -p ./target/doc/coverage &&
echo '<meta http-equiv="refresh" content="0;url=mil_std_1553b/index.html">' > target/doc/index.html
- name: Download code coverage
id: download-coverage
uses: dawidd6/action-download-artifact@v3
with:
workflow: testing.yaml
name: code-coverage
path: ./target/doc/coverage/
- 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