Browse Source

ci(sync-gitlab): add checkout step before sync

The checkout step with fetch-depth: 0 ensures the full git history is available for the sync operation
TheWildJames 1 year ago
parent
commit
2bce182ca9
1 changed files with 7 additions and 1 deletions
  1. 7 1
      .github/workflows/sync-gitlab.yml

+ 7 - 1
.github/workflows/sync-gitlab.yml

@@ -11,9 +11,15 @@ jobs:
   sync:
     runs-on: ubuntu-latest
     steps:
+    - name: Checkout repository
+      uses: actions/checkout@v4
+      with:
+        fetch-depth: 0
+
     - name: Sync to GitLab
       uses: keninkujovic/gitlab-sync@2.1.0
       with:
         gitlab_url: https://gitlab.com/TheWildJames/${{ github.event.repository.name }}.git
         username: TheWildJames
-        gitlab_pat: ${{ secrets.GITLAB_PAT }}
+        gitlab_pat: ${{ secrets.GITLAB_PAT }}
+        force_push: true