diff --git a/.github/workflows/sync-branches.yml b/.github/workflows/sync-branches.yml new file mode 100644 index 0000000..84853c1 --- /dev/null +++ b/.github/workflows/sync-branches.yml @@ -0,0 +1,23 @@ +name: Update staging and production environments + +on: + push: + branches: + - stage-live + +jobs: + sync-stage-live-to-stage-fork: + if: github.ref == 'refs/heads/stage-live' + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Sync `stage-fork` with `stage-live` + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + run: | + git checkout stage-live + git pull --all + git checkout stage-fork + git merge origin/stage-live + git push \ No newline at end of file