name: Sync To /home/ubuntu/.nanobot/workspace/gfps on: push: paths: - "**/*.md" workflow_dispatch: jobs: sync: runs-on: gfps steps: - name: Sync repo shell: bash run: | set -e TARGET=/home/ubuntu/.nanobot/workspace/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