9
9
sync-demo-branch :
10
10
runs-on : ubuntu-latest
11
11
steps :
12
- # *** CHANGE HERE: Revert to v3 for testing ***
12
+ # Keep v4 for this test
13
13
- name : Checkout demo branch
14
- uses : actions/checkout@v3 # Reverted for testing
14
+ uses : actions/checkout@v4
15
15
with :
16
16
ref : ' demo'
17
17
token : ${{ secrets.DEMO_UPDATE_PAT }}
18
- fetch-depth : 0 # Still needed
18
+ fetch-depth : 0
19
19
20
- # Verify .gitattributes
20
+ # Verify .gitattributes (still good practice)
21
21
- name : Verify .gitattributes
22
22
run : |
23
23
echo "Checking .gitattributes content:"
@@ -29,19 +29,19 @@ jobs:
29
29
git config user.name "GitHub Actions Bot"
30
30
git config user.email "actions-bot@github.com"
31
31
32
- # Disable autocrlf (keep this for now, doesn't hurt)
32
+ # Disable autocrlf
33
33
- name : Disable autocrlf
34
34
run : git config --global core.autocrlf false
35
35
36
36
# Fetch the latest changes from the remote, including main
37
37
- name : Fetch origin
38
38
run : git fetch origin
39
39
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
42
42
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) "
45
45
46
46
# Push the merge commit (and resolved changes) back to the demo branch
47
47
- name : Push changes to demo
0 commit comments