forked from readable-app/readable
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (27 loc) · 933 Bytes
/
ci.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
name: Deploy
on:
push:
branches:
- "main"
repository_dispatch:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Install Shuttle
run: |
set -e
RELEASE=$(curl -fsSL https://api.github.com/repos/jfmontanaro/cargo-shuttle-builds/releases/latest)
URL=$(jq -r <<<$RELEASE '.assets[] | select(.name == "cargo-shuttle_x86_64-unknown-linux-gnu") | .browser_download_url')
curl -fsSL $URL > cargo-shuttle
chmod +x cargo-shuttle
mv cargo-shuttle ~/.cargo/bin
- name: Checkout source
uses: actions/checkout@v3
- name: Deploy to Shuttle
run: |
set -e
cargo shuttle login --api-key ${{ secrets.SHUTTLE_DEPLOY_KEY }}
# the official Shuttle action strips out the database uri, we might as well do the same
cargo shuttle deploy | awk '!/Database URI.*?$/'