fixing the sync (#82) #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |