Skip to content
Latchkey

How to Queue Deploys Without Canceling in GitHub Actions

Setting cancel-in-progress: false makes a new run wait for the current one to finish instead of interrupting it.

For deploys you rarely want to cancel a release mid-flight. A shared concurrency group with cancel-in-progress: false queues the next run behind the running one so only one deploy proceeds at a time.

Steps

  • Give the deploy job (or workflow) a stable concurrency.group.
  • Set cancel-in-progress: false so a running deploy is never interrupted.
  • Newer queued runs wait; only the most recent pending one is kept.

Workflow

.github/workflows/deploy.yml
on:
  push:
    branches: [main]
concurrency:
  group: deploy-production
  cancel-in-progress: false
jobs:
  deploy:
    runs-on: ubuntu-latest
    environment: production
    steps:
      - uses: actions/checkout@v4
      - run: ./deploy.sh

Gotchas

  • Only one pending run is queued per group; a third push cancels the earlier pending one, not the running one.
  • Latchkey managed runners cut the queue time on serialized deploys and auto-retry transient failures.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →