Update sync-upstream.yml #16
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: Create Docs PR | |
on: | |
push: | |
branches: | |
- main-js | |
workflow_dispatch: | |
jobs: | |
create-docs-pr: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
name: Sync latest commits from upstream repo | |
steps: | |
- name: Checkout target repo | |
uses: actions/checkout@v4 | |
with: | |
repository: shopify/example-app--payments-app-template--remix | |
fetch-depth: 0 | |
ref: main-js | |
- name: Setup git config | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Setup updates branch | |
run: | | |
git push origin --delete docs_updates &>/dev/null || true | |
git switch -c docs_updates | |
git reset --hard origin/main-js | |
git push origin docs_updates --force | |
- name: Create PR | |
run: | | |
gh pr create --repo Shopify/example-app--payments-app-template--remix --head docs_updates --base docs --title 'Sync docs' --body 'This is an automated PR. Please use this to make any updates to doc tags before merging.' |