Skip to content

Commit

Permalink
fixing the sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Micsushi committed Nov 4, 2024
1 parent 4aac697 commit 4398f12
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/sync-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main

jobs:
sync:
runs-on: ubuntu-latest
Expand All @@ -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

0 comments on commit 4398f12

Please sign in to comment.