-
Notifications
You must be signed in to change notification settings - Fork 1
29 lines (27 loc) · 919 Bytes
/
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
name: 'Fly.io Deploy'
on:
workflow_dispatch:
schedule:
- cron: 30 12 * * 5
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
with:
version: 0.3.40
- name: prepare secrets
env:
SECRETS: "${{ toJSON(secrets) }}"
run: |
grep -v ^\# < .secrets >> $GITHUB_ENV
echo "$SECRETS" | jq -r 'keys[] as $k | "\($k)=\(.[$k])"' >> $GITHUB_ENV
- name: create app
run: flyctl apps create --name $FLY_APP 2>/dev/null || true
- name: create volume
run: flyctl volume create vaultwarden -y -n 1 -r $FLY_REGION 2>/dev/null || true
- name: exports secrets
run: env | grep ^APP_ | sed 's/^APP_//g' | flyctl secrets import --stage
- name: deploy app
run: flyctl deploy --yes --remote-only --regions $FLY_REGION