-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 929 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
37
name: 🚀 Deploy
on:
push:
branches:
- main
- dev
jobs:
deploy:
name: 🚀 Deploy
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: 👀 Read the app name
uses: SebRollen/[email protected]
id: app_name
with:
file: "fly.toml"
field: "app"
- name: 🚀 Deploy Staging
if: ${{ github.ref == 'refs/heads/dev' }}
uses: superfly/[email protected]
with:
args: "deploy --remote-only --app ${{ steps.app_name.outputs.value }}-staging"
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
- name: 🚀 Deploy Production
if: ${{ github.ref == 'refs/heads/main' }}
uses: superfly/[email protected]
with:
args: "deploy --remote-only"
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}