Skip to content

Commit 7db5fc6

Browse files
authored
Merge pull request #52 from Lumerin-protocol/ci/dispatch-site-rebuild
ci(collateral-abi): dispatch hashpower.io rebuild after publish
2 parents 15cd5b4 + a59eb93 commit 7db5fc6

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

‎.github/workflows/publish-collateral-abi.yml‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,23 @@ jobs:
151151
git tag "$TAG"
152152
git push origin "$TAG"
153153
154+
- name: Trigger hashpower.io rebuild
155+
if: steps.bump.outputs.level != 'none'
156+
continue-on-error: true # site refresh is best-effort — never blocks a publish
157+
env:
158+
DISPATCH_TOKEN: ${{ secrets.HASHPOWER_IO_DISPATCH_TOKEN }}
159+
run: |
160+
if [ -z "$DISPATCH_TOKEN" ]; then
161+
echo "::warning::HASHPOWER_IO_DISPATCH_TOKEN is not set — hashpower.io will not auto-refresh /deployments.json and /build. Add a fine-grained PAT (hashpower-io repo, Contents: read/write) as an org or repo secret."
162+
exit 0
163+
fi
164+
curl -sf -X POST \
165+
-H "Authorization: Bearer $DISPATCH_TOKEN" \
166+
-H "Accept: application/vnd.github+json" \
167+
https://api.github.com/repos/Lumerin-protocol/hashpower-io/dispatches \
168+
-d "{\"event_type\":\"abi-published\",\"client_payload\":{\"package\":\"@hashpower/collateral-abi\",\"version\":\"${{ steps.bump.outputs.version }}\",\"source_ref\":\"${{ github.ref_name }}\"}}"
169+
echo "Dispatched abi-published to Lumerin-protocol/hashpower-io"
170+
154171
- name: Summary
155172
if: steps.bump.outputs.level != 'none'
156173
run: |

0 commit comments

Comments
 (0)