From 1026762190f8118405537648978c08b2c7a2c101 Mon Sep 17 00:00:00 2001 From: Elijah Date: Thu, 1 Feb 2024 21:04:08 +0100 Subject: [PATCH] Test calling build script from passing pipeline --- .gitea/workflows/ci-pipeline.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.gitea/workflows/ci-pipeline.yaml b/.gitea/workflows/ci-pipeline.yaml index f7d4633..6154ab1 100644 --- a/.gitea/workflows/ci-pipeline.yaml +++ b/.gitea/workflows/ci-pipeline.yaml @@ -69,3 +69,17 @@ jobs: source venv/bin/activate python manage.py test + + deploy: + needs: test + runs-on: self-hosted + steps: + - uses: actions/checkout@v4 + - name: Trigger Remote Script + run: | + response=$(curl -s -o /dev/null -w "%{http_code}" -X POST http://your-server-ip:5000/trigger-script -H "Authorization: SecretToken") + if [ "$response" -ne 200 ]; then + echo "Script execution failed with HTTP status $response" + exit 1 + fi + if: success() && github.ref == 'refs/heads/main'