iterate on staging push #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync Staging with Main | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout main branch | |
uses: actions/checkout@v2 | |
with: | |
ref: staging | |
- name: Setup Git | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Fetch main branch | |
run: git fetch origin main | |
- name: Merge main into staging | |
run: git merge origin/main --no-edit --allow-unrelated-histories | |
- name: Push changes to staging | |
run: git push origin staging | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |