Skip to content

Commit

Permalink
🚀 do not allow staging and prod deployment at the same time
Browse files Browse the repository at this point in the history
  • Loading branch information
joelazar committed Oct 13, 2022
1 parent 81d78cf commit 23e5d68
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/production_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ jobs:
runs-on: ubuntu-latest
environment: production
steps:
- name: Wait for possible ongoing staging deployment to succeed
uses: lewagon/[email protected]
with:
ref: main
check-name: '🚀 Staging deployment'
repo-token: ${{ secrets.PAT }}
wait-interval: 20

- name: Do some magic
run: echo magic

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/staging_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ on:
branches: [main]

jobs:
deploy-preprod:
deploy-staging:
name: 🚀 Staging deployment
runs-on: ubuntu-latest
environment: staging
steps:
- name: Do some magic
run: echo magic

- name: Sleep for 120 seconds
run: sleep 120

0 comments on commit 23e5d68

Please sign in to comment.