-
-
Notifications
You must be signed in to change notification settings - Fork 28
36 lines (30 loc) · 915 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
30
31
32
33
34
35
36
name: ☁️ Deploy to the cloud
on:
workflow_dispatch:
push:
branches:
- master
concurrency:
group: deployment
cancel-in-progress: true
jobs:
deploy:
name: 🚀 Deploy app
runs-on: ubuntu-latest
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: ✍ Set app name
run: |
if [[ -n "${{ secrets.FLY_APP_NAME }}" ]]; then
echo "APP_NAME=${{ secrets.FLY_APP_NAME }}" >> $GITHUB_ENV
else
echo "APP_NAME=${REPO_OWNER,,}-gsw" >> $GITHUB_ENV
fi
env:
REPO_OWNER: '${{ github.repository_owner }}'
- name: 🛩 Deploy to fly.io
run: flyctl deploy --remote-only --auto-confirm --regions ${{ secrets.FLY_REGION }} --app ${{ env.APP_NAME }}