Skip to content

Commit

Permalink
Cancel in progress deploys
Browse files Browse the repository at this point in the history
This block accomplishes two things:

- The `concurrency.group` setting ensures that only 1 deploy can be
  attempted at any time
- The `concurrency.cancel-in-progress` setting ensures that the last
  scheduled deploy cancels any in-progress earlier deploys

This should lead to less failed deploys on Tuesday when we usually merge
a few Dependabot PRs back to back and cause a deploy queue to occur.

Using `github.workflow` and `github-ref` to identify the concurrency
group ensures that deploys from different branches or to different
environments should not clash.
  • Loading branch information
tvararu committed Jul 22, 2024
1 parent 0e5cea4 commit 03888f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ jobs:
id-token: write
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down

0 comments on commit 03888f1

Please sign in to comment.