forked from Weaverse/naturelle
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (34 loc) · 1 KB
/
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
38
39
40
41
42
43
44
45
name: 🚀 Deploy
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
actions: write
contents: read
jobs:
deploy:
name: 🚀 Deploy
runs-on: ubuntu-latest
# needs: [typecheck, quality]
# only deploy main/dev branch on pushes
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: 👀 Read app name
uses: SebRollen/[email protected]
id: app_name
with:
file: fly.toml
field: app
- name: 🎈 Setup Fly
uses: superfly/flyctl-actions/setup-flyctl@master
- name: 🚀 Deploy Production
if: ${{ github.ref == 'refs/heads/main' }}
run: flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} --app ${{ steps.app_name.outputs.value }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}