File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Notify Tencent Pages Webhook on server changes
2+
3+ on :
4+ push :
5+ branches :
6+ - dev
7+ paths :
8+ - " src/server/**"
9+
10+ jobs :
11+ notify :
12+ name : Send webhook POST
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Send webhook POST to EO Pages
16+ env :
17+ WEBHOOK_URL : ${{ secrets.EO_PAGES_WEBHOOK }}
18+ run : |
19+ set -e
20+ echo "::add-mask::${WEBHOOK_URL}"
21+
22+ payload='{"ref":"'"$GITHUB_REF"'","repository":"'"$GITHUB_REPOSITORY"'","pusher":"'"$GITHUB_ACTOR"'"}'
23+
24+ status=$(curl -s -o /dev/null -w "%{http_code}" -X POST -H "Content-Type: application/json" -d "$payload" "$WEBHOOK_URL")
25+
26+ if [ "$status" -ge 200 ] && [ "$status" -lt 300 ]; then
27+ echo "Webhook POST succeeded (status $status)"
28+ else
29+ echo "Webhook POST failed with status $status"
30+ exit 1
31+ fi
You can’t perform that action at this time.
0 commit comments