Skip to content

Rework CI workflows #196

Rework CI workflows

Rework CI workflows #196

Workflow file for this run

name: Publish Documentation
on:
push:
branches: [ master, trying ]
jobs:
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install toolchain
run: rustup toolchain install nightly --no-self-update --profile minimal --target thumbv7em-none-eabihf
- name: Set nightly toolchain as default
run: rustup default nightly && cargo --version
- name: Generate BSP docs
run: cargo rustdoc --target thumbv7em-none-eabihf --all-features -- --cfg docsrs
- name: Generate FCB docs
run: cargo rustdoc --target thumbv7em-none-eabihf --package teensy4-fcb
- name: Generate panic docs
run: cargo rustdoc --target thumbv7em-none-eabihf --package teensy4-panic
- name: Generate pins docs
run: cargo rustdoc --target thumbv7em-none-eabihf --package teensy4-pins
- name: Write redirect
run: echo "<meta http-equiv=\"refresh\" content=\"0;url=teensy4_bsp\">" > target/thumbv7em-none-eabihf/doc/index.html
- name: Deploy to GitHub pages
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: target/thumbv7em-none-eabihf/doc
publish_branch: gh-pages