Fix deploy job exit codes and webhook ip

This commit is contained in:
Elijah 2024-02-01 21:21:10 +01:00
parent 186d7e33a6
commit 2c720e80ab
1 changed files with 4 additions and 1 deletions

View File

@ -77,9 +77,12 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Trigger Remote Script - name: Trigger Remote Script
run: | run: |
response=$(curl -s -o /dev/null -w "%{http_code}" -X POST http://your-server-ip:5000/trigger-script -H "Authorization: SecretToken") response=$(curl -s -o /dev/null -w "%{http_code}" -X POST http://45.150.187.54:5000/trigger-script -H "Authorization: SecretToken")
if [ "$response" -ne 200 ]; then if [ "$response" -ne 200 ]; then
echo "Script execution failed with HTTP status $response" echo "Script execution failed with HTTP status $response"
exit 1 exit 1
else
echo "Script execution successful"
exit 0
fi fi
if: success() && github.ref == 'refs/heads/main' if: success() && github.ref == 'refs/heads/main'