Use this file to discover all available pages before exploring further.
Controlling how jobs run in parallel is crucial for production workflows. GitHub Actions’ concurrency key lets you ensure that only one workflow or job in a specified group runs at a time—preventing resource contention, conflicting deployments, or race conditions.
After you trigger this workflow (e.g., via workflow_dispatch), the docker job runs first. The deploy job then spins up the container and sleeps for 600 seconds:
Without any concurrency settings, multiple runs will queue up and execute deploy in parallel—often not what you want in production.
Use the concurrency key to define a group name and control behavior with cancel-in-progress. Here’s how to cancel any in-progress deploy when a new run starts:
The group value can include {{ github.ref }}, {{ github.sha }}, or environment variables to make it unique per branch or environment.
See workflow syntax: concurrency.
When a new run starts, any in-progress deploy in production-deployment is canceled: