Skip to content

Commit 1ee3eb1

Browse files
Erethonfricklerhandwerk
authored andcommitted
fix: Add concurrency on deployment jobs
Prevent concurrent deployment jobs from running on the same host.
1 parent a58a0a3 commit 1ee3eb1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/deployments.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
branches: [main, production]
55
jobs:
66
deploy-environment:
7+
concurrency:
8+
group: deploy-${{ matrix.environment }}
9+
cancel-in-progress: false
710
runs-on: ubuntu-latest
811
strategy:
912
matrix:
@@ -20,10 +23,9 @@ jobs:
2023
- uses: webfactory/ssh-agent@a6f90b1f127823b31d4d4a8d96047790581349bd # v0.9.1
2124
with:
2225
ssh-private-key: ${{ secrets.DEPLOY_SSH_PRIVATE_KEY }}
23-
- name: Trust staging server public SSH host keys
26+
- name: Trust server public SSH host keys
2427
run: cat ./infra/host_keys >> ~/.ssh/known_hosts
2528
- name: Deploy to ${{ matrix.environment }}
26-
# Only deploy production when on production branch
2729
if: github.ref_name == matrix.branch
2830
run: |
2931
nix-build -A ci

0 commit comments

Comments
 (0)