From b51b25d95ac774521dfea63eda4f03efec2f5ec1 Mon Sep 17 00:00:00 2001 From: Michalina Date: Fri, 20 Oct 2023 17:31:57 +0200 Subject: [PATCH] Test syncing job --- .github/workflows/sync-branches.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/sync-branches.yml 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