File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to Fly.io
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ deploy :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout main
14+ uses : actions/checkout@v4
15+ with :
16+ ref : main
17+ fetch-depth : 0
18+
19+ - name : Set up Git
20+ run : |
21+ git config user.name "github-actions[bot]"
22+ git config user.email "github-actions[bot]@users.noreply.github.com"
23+
24+ - name : Fetch deployment branch
25+ run : git fetch origin deployment:deployment
26+
27+ - name : Attempt merge
28+ id : merge_attempt
29+ run : |
30+ git checkout deployment
31+ git merge origin/main --no-edit || echo "MERGE_FAILED=true" >> $GITHUB_ENV
32+
33+ - name : Push to deployment branch
34+ if : env.MERGE_FAILED != 'true'
35+ run : |
36+ git push origin deployment
37+
38+ - name : Deploy to Fly.io
39+ if : env.MERGE_FAILED != 'true'
40+ uses : superfly/flyctl-actions@1.4
41+ with :
42+ args : deploy --remote-only
43+ env :
44+ FLY_API_TOKEN : ${{ secrets.FLY_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments