@@ -68,24 +68,24 @@ jobs:
6868 DIGEST : ${{ steps.build-and-push.outputs.digest }}
6969 run : echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
7070
71- # - name: Dokploy Deployment
72- # if: github.ref == 'refs/heads/main' && github.event_name == 'push'
73- # run: |
74- # response=$(curl -X 'POST' \
75- # "$DOKPLOY_URL/api/application.deploy" \
76- # -H 'accept: application/json' \
77- # -H 'Content-Type: application/json' \
78- # -H "x-api-key: $DOKPLOY_AUTH_TOKEN" \
79- # -d "{\"applicationId\": \"$DOKPLOY_APPLICATION_ID\"}" \
80- # -w "%{http_code}" \
81- # -o /dev/null \
82- # -s)
71+ - name : Dokploy Deployment
72+ if : github.ref == 'refs/heads/main' && github.event_name == 'push'
73+ run : |
74+ response=$(curl -X 'POST' \
75+ "$DOKPLOY_URL/api/application.deploy" \
76+ -H 'accept: application/json' \
77+ -H 'Content-Type: application/json' \
78+ -H "x-api-key: $DOKPLOY_AUTH_TOKEN" \
79+ -d "{\"applicationId\": \"$DOKPLOY_APPLICATION_ID\"}" \
80+ -w "%{http_code}" \
81+ -o /dev/null \
82+ -s)
8383
84- # if [ "$response" -ne 200 ]; then
85- # echo "Deployment failed with status code: $response"
86- # exit 1
87- # fi
88- # env:
89- # DOKPLOY_AUTH_TOKEN: ${{ secrets.DOKPLOY_AUTH_TOKEN }}
90- # DOKPLOY_APPLICATION_ID: ${{ secrets.DOKPLOY_APPLICATION_ID }}
91- # DOKPLOY_URL: ${{ secrets.DOKPLOY_URL }}
84+ if [ "$response" -ne 200 ]; then
85+ echo "Deployment failed with status code: $response"
86+ exit 1
87+ fi
88+ env :
89+ DOKPLOY_AUTH_TOKEN : ${{ secrets.DOKPLOY_AUTH_TOKEN }}
90+ DOKPLOY_APPLICATION_ID : ${{ secrets.DOKPLOY_APPLICATION_ID }}
91+ DOKPLOY_URL : ${{ secrets.DOKPLOY_URL }}
0 commit comments