Skip to content

fixing the sync (#82) #3

fixing the sync (#82)

fixing the sync (#82) #3

name: Sync Fork with Main Repo
on:
push:
branches:
- main
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
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:
PERSONAL_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: |
# 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