Hi all! We’re using the following GitHub Action to deploy to Fly on pushes to main
. We often find it takes >10 minutes to deploy, and lately are hitting frequent failures due to health checks, which require us to rerun the deploy (taking another 10+ minutes).
I’m curious if there is anything obvious we should be doing to optimize our build/deploy times with Fly? I’m open to any and all suggestions. Thank you!
on:
push:
branches:
- main
workflow_dispatch:
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
concurrency:
# only a single deploy allowed at a time
group: deploy
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- id: commit
uses: pr-mpt/actions-commit-hash@v2
- uses: actions/checkout@v3
- name: Setup Fly
if: ${{ steps.changes.outputs.api == 'true' }}
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Deploy API
if: ${{ steps.changes.outputs.api == 'true' }}
working-directory: api
run: flyctl deploy --remote-only -e RELEASE_SHA=${{ steps.commit.outputs.short }}