Stuff Messages to increase throughput #270
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: | |
push: | |
branches: [ master ] | |
pull_request: | |
jobs: | |
docs: | |
name: Deploy Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install packages | |
run: sudo apt update && sudo apt install -y cmake | |
- name: Install Arm GNU Toolchain (arm-none-eabi-gcc) | |
uses: carlosperate/arm-none-eabi-gcc-action@v1 | |
with: | |
release: '12.2.Rel1' | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: thumbv7em-none-eabihf | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install Netlify CLI | |
run: npm install -g netlify-cli | |
- name: Build Documentation | |
run: cargo doc --no-deps | |
- name: Deploy to Netlify | |
if: github.ref == 'refs/heads/master' | |
run: netlify deploy --dir=target/thumbv7em-none-eabihf/doc --prod --auth=${{ secrets.NETLIFY_AUTH_TOKEN }} --site=${{ secrets.NETLIFY_SITE_ID }} | |
- name: Deploy to Netlify (staging) | |
if: github.event.pull_request && github.ref != 'refs/heads/master' | |
run: netlify deploy --dir=target/thumbv7em-none-eabihf/doc --auth=${{ secrets.NETLIFY_AUTH_TOKEN }} --site=${{ secrets.NETLIFY_SITE_ID }} |