diff --git a/.github/workflows/sync-staging.yml b/.github/workflows/sync-staging.yml new file mode 100644 index 0000000..67d7073 --- /dev/null +++ b/.github/workflows/sync-staging.yml @@ -0,0 +1,31 @@ +--- +name: sync-staging + +on: + push: + branches: + - main + +jobs: + # after main updated (merge from staging), sync staging to main + sync-staging: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config --global user.name "GitHub Actions Bot" + git config --global user.email "" + + - name: Update Test Branch + run: | + git checkout main + git fetch origin + git checkout staging + git pull + git merge origin/main + git push origin staging \ No newline at end of file