-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (30 loc) · 1.05 KB
/
Copy pathdeploy.yml
File metadata and controls
35 lines (30 loc) · 1.05 KB
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
name: Deploy to Fly.io
# Deploys the control plane to Fly.io when a release is published.
# Requires the FLY_API_TOKEN repo secret (create with: flyctl tokens create deploy -a <app>).
# Skips automatically if the secret is absent.
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Abort if Fly token not configured
if: ${{ secrets.FLY_API_TOKEN == '' }}
run: |
echo "FLY_API_TOKEN secret is not set — skipping deploy."
echo "Create it with: flyctl tokens create deploy -a <your-app>"
exit 0
- name: Set up Flyctl
if: ${{ secrets.FLY_API_TOKEN != '' }}
uses: superfly/flyctl-actions/setup-flyctl@1.5
- name: Deploy
if: ${{ secrets.FLY_API_TOKEN != '' }}
run: flyctl deploy --remote-only --strategy=rolling
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}