Skip to content

Fly.io Deploy

Fly.io Deploy #74

Workflow file for this run

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