File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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"
You can’t perform that action at this time.
0 commit comments