Skip to content

Commit 5954b00

Browse files
committed
Add portfolio rebuild notification workflow
1 parent 68fa19b commit 5954b00

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# TEMPLATE: Add this workflow to tracked repos to trigger portfolio rebuilds on push
2+
#
3+
# To use:
4+
# 1. Copy this file to the tracked repo: .github/workflows/notify-portfolio.yml
5+
# 2. Add GitHub secret: PORTFOLIO_REBUILD_TOKEN (personal access token with repo scope)
6+
# 3. Push to main branch - portfolio will rebuild automatically
7+
8+
name: Notify Portfolio
9+
10+
on:
11+
push:
12+
branches: [main, master]
13+
14+
jobs:
15+
notify:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Trigger Portfolio Rebuild
20+
run: |
21+
# Get repo name (e.g., "samifouad/gild")
22+
REPO_NAME="${{ github.repository }}"
23+
24+
echo "📢 Notifying portfolio of changes to $REPO_NAME"
25+
26+
# Trigger repository_dispatch event on portfolio repo
27+
curl -X POST \
28+
-H "Accept: application/vnd.github.v3+json" \
29+
-H "Authorization: token ${{ secrets.PORTFOLIO_REBUILD_TOKEN }}" \
30+
https://api.github.com/repos/samifouad/website/dispatches \
31+
-d "{\"event_type\":\"rebuild-portfolio\",\"client_payload\":{\"repo\":\"$REPO_NAME\"}}"
32+
33+
echo "✅ Portfolio notified successfully"

0 commit comments

Comments
 (0)