Merge pull request #15 from nityc-d-robo/develop #13
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: Rust | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install protobuf-compiler | |
- name: Build | |
run: cargo build --verbose | |
# - name: Run tests | |
# run: cargo test --verbose | |
doc: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.event_name == 'push' || github.event.pull_request.merged == true | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run doc | |
run: cargo doc --no-deps | |
- name: Deploy | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: target/doc | |
deploy: | |
needs: doc | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |