Rework CI workflows #196
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: 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 |