Deploy performance using GitHub Actions

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 }}

Hi @rnystrom,
We noticed a single host in the iad region was getting overloaded with new deployments, which caused slower-than-usual deploys for a few hours (between 2023-02-02T17:00:00Z2023-02-02T21:50:00Z, looking back at our metrics).

I’d suggest just running your deploy again now that this backlog has cleared up. Sorry for the inconvenience! We’re doing ongoing work to add more capacity fix these deploy-performance hotspots to reduce these kinds of issues moving forward.

1 Like