37 lines
854 B
YAML
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 |