ci: add sync-to-gitea workflow
This commit is contained in:
parent
1e89f905e7
commit
ec0982fb50
1 changed files with 27 additions and 0 deletions
27
.github/workflows/sync-to-gitea.yml
vendored
Normal file
27
.github/workflows/sync-to-gitea.yml
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
name: sync-to-gitea
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Push to Gitea main
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
run: |
|
||||
echo "Syncing nxtgauge-ai-assistant:main → Gitea main"
|
||||
echo "Commit: $(git rev-parse HEAD)"
|
||||
|
||||
git remote add gitea "https://Admin:${GITEA_TOKEN}@ci.nxtgauge.com/Admin/nxtgauge-ai-assistant.git"
|
||||
git push gitea main:main --force-with-lease
|
||||
|
||||
echo "Sync complete!"
|
||||
Loading…
Add table
Reference in a new issue