Skip to content

Commit 45f5f3e

Browse files
committed
Prevent concurrent deployments from the deploy.yml workflow
This avoids running the workflow for every push, so that we don't do redundant work that will be replaced immediately by a later deployment. If an existing deploy workflow is running, pushing new commits will not run the deploy workflow for the new commits until the first workflow finishes. If more than one new push happens while the workflow is running, the workflow will only be run for the last push. Also add 'workflow_dispatch:' to allow running the workflow manually.
1 parent 7b70b25 commit 45f5f3e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ on:
77
push:
88
branches: [ master ]
99

10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
14+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
18+
1019
jobs:
1120
update-html-pages:
1221
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)