Skip to content

Sync Repo

Sync Repo #11

Workflow file for this run

name: Sync Repo
on:
schedule:
- cron: "0 * * * *"
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout This Repo
uses: actions/checkout@v3
- name: Checkout Target Repo
uses: actions/checkout@v3
with:
repository: RotCHM/RotCHM
ref: main
- name: Sync Code
run: |
rsync -av --delete ./ ./../sync/
cd ../sync/
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add .
git commit -m "Sync from upstream repo" || echo "No changes to commit"
- name: Force Pull and Push Changes
run: |
git remote set-url origin https://hatton613:${{ secrets.PAT }}@github.com/hatton613/BearLLM.git
git fetch origin main
git reset --hard origin/main
git push origin main --force