Files
gfps/.gitea/workflows/sync-to-host.yml
魏风 e6b4e86f56
All checks were successful
Sync To /home/ubuntu/gfps / sync (push) Successful in 1s
test1
2026-05-02 11:09:31 +08:00

37 lines
854 B
YAML

name: Sync To /home/ubuntu/gfps
on:
push:
branches:
- main
jobs:
sync:
runs-on: gfps
steps:
- name: Sync repo
shell: bash
run: |
set -e
TARGET=/home/ubuntu/gfps
REPO="http://oauth2:${{ gitea.token }}@172.17.0.1:3000/${{ github.repository }}.git"
mkdir -p "$TARGET"
cd "$TARGET"
if [ ! -d .git ]; then
git clone "$REPO" .
else
git remote set-url origin "$REPO"
fi
git fetch --prune origin
git reset --hard "${{ github.sha }}"
git clean -fd
- name: Rebuild gfps index
shell: bash
run: |
set -e
sudo -u nanobot -H /home/nanobot/nanobot/.venv/bin/python \
/home/nanobot/.nanobot/workspace/skills/gfps-kb/gfps_kb.py index