Skip to content

Commit

Permalink
feat: test branch sync
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-godefroy-dev committed Sep 3, 2024
1 parent c0cc3c9 commit d4fa75e
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/sync-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,26 @@ jobs:
runs-on: ubuntu-latest
name: Syncing branches
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: ⚙️ Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history to ensure the correct state
fetch-depth: 0

- name: Configure Git
- name: ⚙️ Configure Git
run: |
#! Prepare git so we can push a tag
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Fetch all branches
- name: ⚙️ Fetch all branches
run: git fetch --all

- name: Create or overwrite the 'feature/syncing-test' branch
- name: ⚙️ Create or overwrite the 'feature/syncing-test' branch
run: |
git checkout main
git branch -f feature/syncing-test # Force create/update 'feature/syncing-test' branch to point to 'main'
git branch -f feature/syncing-test
- name: Push 'feature/syncing-test' branch to remote
- name: ⚙️ Push 'feature/syncing-test' branch to remote
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push origin feature/syncing-test --force # Force push 'feature/syncing-test' branch to the remote
git push origin feature/syncing-test --force

0 comments on commit d4fa75e

Please sign in to comment.