update deploy #4
This file contains hidden or 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
| on: | |
| workflow_run: | |
| workflows: [sync from open] | |
| types: | |
| - completed | |
| permissions: | |
| contents: write | |
| jobs: | |
| update_branch: | |
| if: | | |
| github.event.repository.name == 'staging_open' | |
| name: Merge main into deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository (no persisted credentials) | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: deploy | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Configure git | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| - name: Update deployment main | |
| run: | | |
| git merge --squash -X theirs origin/main | |
| git restore --staged README.md | |
| git commit -m "deploy changes" | |
| git push |