-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (34 loc) · 1.16 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
name: Production Deploy
on:
release:
types: [published]
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
jobs:
# check-for-changes:
# runs-on: ubuntu-latest
# permissions:
# contents: read
# outputs:
# exitCode: ${{ steps.check.outputs.exitCode }}
# steps:
# # uses turborepo to check for changes to build dependencies in @biscuits/server
# - name: Checkout repository
# uses: actions/checkout@v3
# - name: Check for changes
# run: npx turbo-ignore @biscuits/server --task=build
# id: check
# continue-on-error: true
deploy:
runs-on: ubuntu-latest
name: Deploy to production
# needs: check-for-changes
# if: needs.check-for-changes.outputs.exitCode == '1'
steps:
- uses: actions/checkout@v2
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-7`" >> $GITHUB_ENV
- name: Deploy API
# deploy the image from ghcr.io for the target sha (short version)
run: flyctl deploy --image ghcr.io/a-type/biscuits:sha-${SHORT_SHA}