Skip to content

Keep the fly machine up all the time #2

Keep the fly machine up all the time

Keep the fly machine up all the time #2

Workflow file for this run

# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/
name: Fly Deploy
on:
push:
branches:
- master
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Run Go tests
run: |
cd backend
go test ./... -timeout 10m -p 1
deploy:
name: Deploy app
runs-on: ubuntu-latest
needs: test
environment: production
concurrency: deploy-group # optional: ensure only one action runs at a time
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}