Skip to content

Commit 5423c02

Browse files
committed
added new 5
1 parent 3a2dcdd commit 5423c02

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/sync-demo-branch.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ jobs:
99
sync-demo-branch:
1010
runs-on: ubuntu-latest
1111
steps:
12-
# *** CHANGE HERE: Revert to v3 for testing ***
12+
# Keep v4 for this test
1313
- name: Checkout demo branch
14-
uses: actions/checkout@v3 # Reverted for testing
14+
uses: actions/checkout@v4
1515
with:
1616
ref: 'demo'
1717
token: ${{ secrets.DEMO_UPDATE_PAT }}
18-
fetch-depth: 0 # Still needed
18+
fetch-depth: 0
1919

20-
# Verify .gitattributes
20+
# Verify .gitattributes (still good practice)
2121
- name: Verify .gitattributes
2222
run: |
2323
echo "Checking .gitattributes content:"
@@ -29,19 +29,19 @@ jobs:
2929
git config user.name "GitHub Actions Bot"
3030
git config user.email "actions-bot@github.com"
3131
32-
# Disable autocrlf (keep this for now, doesn't hurt)
32+
# Disable autocrlf
3333
- name: Disable autocrlf
3434
run: git config --global core.autocrlf false
3535

3636
# Fetch the latest changes from the remote, including main
3737
- name: Fetch origin
3838
run: git fetch origin
3939

40-
# Perform the merge from main into demo (Relying on .gitattributes)
41-
- name: Merge main into demo (using .gitattributes)
40+
# *** CHANGE HERE: Use -X ours strategy ***
41+
- name: Merge main into demo using -X ours
4242
run: |
43-
# Relying on .gitattributes to handle demo-specific folders
44-
git merge --no-ff origin/main -m "Auto-merge main into demo"
43+
# Using -X ours to force keeping demo's version on all conflicts
44+
git merge --no-ff -X ours origin/main -m "Auto-merge main into demo (using -X ours)"
4545
4646
# Push the merge commit (and resolved changes) back to the demo branch
4747
- name: Push changes to demo

0 commit comments

Comments
 (0)