diff --git a/.forgejo/workflows/auto-retrain-knowledge.yml b/.forgejo/workflows/auto-retrain-knowledge.yml index 44f0414..680a512 100644 --- a/.forgejo/workflows/auto-retrain-knowledge.yml +++ b/.forgejo/workflows/auto-retrain-knowledge.yml @@ -55,13 +55,24 @@ jobs: env: FORCE_TRAINING: ${{ inputs.force }} - - name: Trigger training on VPS + - name: Trigger training on GPU workstation if: steps.check.outputs.should_train == 'true' run: | - echo "Triggering training on VPS via systemd..." + echo "Triggering training on GPU workstation via webhook..." - # In production, this would SSH to the VPS and trigger systemd service - # For now, create a marker file that monitoring can pick up + # Trigger via webhook (GPU workstation must run training-webhook-server.py) + curl -X POST http://${{ secrets.GPU_WORKSTATION_HOST }}:8888/trigger-training \ + -H "Authorization: Bearer ${{ secrets.TRAINING_WEBHOOK_TOKEN }}" \ + -f -s -o /tmp/trigger-response.json || { + echo "::error::Failed to trigger training on GPU workstation" + exit 1 + } + + # Show response + cat /tmp/trigger-response.json + echo "::notice::Training triggered on GPU workstation" + + # Create marker file for record-keeping mkdir -p .artifacts/training-triggers cat > .artifacts/training-triggers/trigger-$(date +%Y%m%d-%H%M%S).json << EOF {