Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions .github/workflows/website-build.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
name: Trigger Website Build

on:
release:
types:
- published
- unpublished
- deleted

permissions:
contents: read

jobs:
trigger-website-build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Install HTTPie
run: sudo snap install --edge httpie
- name: Trigger website build
run: http --ignore-stdin POST ${{ secrets.PIE_WEB_VERCEL_HOOK }}
env:
WEBHOOK_URL: ${{ secrets.PIE_WEB_VERCEL_HOOK }}
run: |
set -euo pipefail
if [[ -z "${WEBHOOK_URL:-}" ]]; then
echo "::error::PIE_WEB_VERCEL_HOOK secret is not set"
exit 1
fi
for i in 1 2 3; do
if curl -fsS -X POST "${WEBHOOK_URL}"; then
echo "Webhook triggered successfully (attempt $i)"
exit 0
fi
echo "Attempt $i failed, retrying..."
sleep 5
done
echo "::error::Failed to trigger webhook after 3 attempts"
exit 1