diff --git a/.github/workflows/sync-data.yml b/.github/workflows/sync-data.yml new file mode 100644 index 0000000..d5f064c --- /dev/null +++ b/.github/workflows/sync-data.yml @@ -0,0 +1,28 @@ +name: Sync Folder to Another Repo + +on: + push: + paths: + - 'data/**' + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - name: Checkout source repo + uses: actions/checkout@v3 + + - name: Copy folder and push to target repo + run: | + mkdir temp + cp -r data/* temp/ + cd temp + + git init + git config user.name "Gitea Action Bot" + git config user.email "action@gitea.local" + + git remote add origin https://${GITEA_TOKEN}@git.reptilfpv.de/reptil1990/AquaMasterFrontend + git add . + git commit -m "Sync data from source repo" + git push --force origin main