Skip to content

Commit

Permalink
feat: add deploy-dev workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
grikomsn committed Dec 1, 2023
1 parent 8cd2f99 commit e3bc6e8
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy
on:
pull_request:
branches: [staging]
types: [closed]
push:
branches: [staging]
repository_dispatch:
types: [deploy-dev]
workflow_dispatch:

jobs:
sync:
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v3
with:
ref: dev

- id: pull-staging
name: Pull latest 'staging'
run: git pull origin staging

- id: diff-check
name: Check if 'dev' is behind 'staging'
run: git diff --exit-code origin/staging

- id: fast-forward
name: Fast forward 'staging' → 'dev'
run: git merge --ff-only origin/staging

- id: push-dev
name: Push latest 'dev'
run: git push --set-upstream origin dev

0 comments on commit e3bc6e8

Please sign in to comment.