Skip to content

Sync to deployment (#83) #5

Sync to deployment (#83)

Sync to deployment (#83) #5

name: Sync Fork with Main Repo
on:
push:
branches:
- main
jobs:
sync:
# Only run if the repository is the org repo
if: github.repository == 'Gym-Bros-Programs/banana-math'
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
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: |
git remote add destination "https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/Micsushi/banana-math-deployment.git"
git push destination main:main --force