-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (32 loc) · 1.21 KB
/
shuttle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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