Skip to content

Shuttle Deploy

Shuttle Deploy #25

Workflow file for this run

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' && github.event_name == 'push' }}
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: Build client
run: ./scripts/build_chat_client.sh
- 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