Update sync-branches.yml fetch depth #20
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: 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 | |
with: | |
fetch-depth: '0' | |
- name: Sync `stage-fork` with `stage-live` | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
run: | | |
git log -n 5 --oneline > commit_history.txt | |
cat commit_history.txt | |
git checkout stage-live | |
git log -n 5 --oneline > commit_history_live.txt | |
cat commit_history_live.txt | |
git checkout stage-fork | |
git log -n 5 --oneline > commit_history_fork.txt | |
cat commit_history_fork.txt | |
git merge origin/stage-live | |
git push orgin stage-fork |