v0.1.3 #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |