From 4398f12ba4edf0435dcd12d60140efeb9b7c9b90 Mon Sep 17 00:00:00 2001 From: "Wenjian(Michael) Shi" <61084115+Micsushi@users.noreply.github.com> Date: Sun, 3 Nov 2024 19:37:45 -0700 Subject: [PATCH] fixing the sync --- .github/workflows/sync-deployment.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sync-deployment.yml b/.github/workflows/sync-deployment.yml index da707e9..1105d67 100644 --- a/.github/workflows/sync-deployment.yml +++ b/.github/workflows/sync-deployment.yml @@ -4,6 +4,7 @@ on: push: branches: - main + jobs: sync: runs-on: ubuntu-latest @@ -12,11 +13,18 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + # Use PAT instead of GITHUB_TOKEN for checkout + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + + - name: Configure Git + run: | + git config --global user.name "${{ github.actor }}" + git config --global user.email "${{ github.actor }}@users.noreply.github.com" - name: Push to private fork env: - SOURCE_REPO: "https://${{ secrets.GITHUB_TOKEN }}@github.com/Gym-Bros-Programs/banana-math.git" - DESTINATION_REPO: "https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/Micsushi/banana-math-deployment.git" + PERSONAL_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} run: | - git remote add destination $DESTINATION_REPO + # Use HTTPS URL with embedded token + git remote add destination "https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/Micsushi/banana-math-deployment.git" git push destination main:main --force \ No newline at end of file