Shuttle Deploy #11
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: Shuttle Deploy | |
on: | |
workflow_run: | |
workflows: [Release Build Confirmation] | |
types: [completed] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/main' }} | |
steps: | |
- uses: wykies/checkout@main | |
- uses: wykies/setup-rust-toolchain@main | |
- name: Load sqlx query files for shuttle version | |
run: cargo run --bin switch-db -- --no-edit-only-copy shuttle | |
- name: Download and install Trunk binary | |
run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- | |
- name: Include git diff for debug | |
run: git diff | |
- name: Include git status for debug | |
run: git status | |
- uses: shuttle-hq/deploy-action@v2 | |
with: | |
shuttle-api-key: ${{ secrets.SHUTTLE_API_KEY }} | |
project-id: ${{ secrets.SHUTTLE_PROJ_ID }} | |
on-failure: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.ref == 'refs/heads/main' }} | |
steps: | |
- run: echo 'The triggering workflow failed. Not deployed!!!' | |
- run: exit 1 |