-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (53 loc) · 1.57 KB
/
deploy.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Shuttle Deploy
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# check out repo if not done already
- id: check-repo-is-not-initialized
run: echo "remote-url=$( git config --get remote.origin.url )" >> $GITHUB_OUTPUT
shell: bash
- uses: actions/checkout@v3
if: ${{ !contains(steps.check-repo-is-not-initialized.outputs.remote-url, github.repository) }}
# install with cargo-binstall
- name: Install cargo-binstall
run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
shell: bash
- name: Install cargo-shuttle
run: cargo binstall -y --locked cargo-shuttle
shell: bash
- name: Clean Cloud Cache
run: cargo shuttle clean
env:
SHUTTLE_API_KEY: ${{ secrets.SHUTTLE_API_KEY }}
working-directory: "."
shell: bash
- name: Deploy to Shuttle
run: |
cargo shuttle deploy \
| awk '!/Database URI.*?$/'
working-directory: "."
env:
SHUTTLE_API_KEY: ${{ secrets.SHUTTLE_API_KEY }}
shell: bash
# - uses: shuttle-hq/deploy-action@main
# with:
# deploy-key: ${{ secrets.SHUTTLE_API_KEY }}
# name: Shuttle Deploy
# on:
# push:
# branches:
# - main
# workflow_dispatch:
# jobs:
# deploy:
# runs-on: ubuntu-latest
# steps:
# - uses: shuttle-hq/deploy-action@main
# with:
# deploy-key: ${{ secrets.SHUTTLE_API_KEY }}