-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (31 loc) · 1.14 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
name: Production Deploy
on:
release:
types: [published]
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy to production
# needs: check-for-changes
# if: needs.check-for-changes.outputs.exitCode == '1'
steps:
- name: Wait for image build workflow
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
check-name: 'Build and push Docker image'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
- 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}
- name: Deploy Web
run: curl -X POST ${{ secrets.CORE_WEB_DEPLOY_HOOK_PROD }}
- name: Deploy Trip Tick
run: curl -X POST ${{ secrets.TRIP_TICK_DEPLOY_HOOK_PROD }}