Skip to content

Weekly Blockchain Node Upgrades Changelog - 2026-04-02 (#1175) #13

Weekly Blockchain Node Upgrades Changelog - 2026-04-02 (#1175)

Weekly Blockchain Node Upgrades Changelog - 2026-04-02 (#1175) #13

name: Index Changelog
on:
push:
branches:
- main
paths:
- "content/changelog/**"
jobs:
index-changelog:
name: Index Changelog
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: ./.github/actions/setup-pnpm
- name: Run changelog indexer
run: pnpm index:changelog
env:
KV_REST_API_TOKEN: ${{ secrets.KV_REST_API_TOKEN }}
KV_REST_API_URL: ${{ secrets.KV_REST_API_URL }}
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_ADMIN_API_KEY: ${{ secrets.ALGOLIA_ADMIN_API_KEY }}
- name: Revalidate changelog index cache
run: |
echo "Revalidating changelog index cache..."
# Create JSON payload
PAYLOAD='{"pathIndices": ["changelog"]}'
# Call revalidation API
HTTP_CODE=$(curl -X POST "${{ secrets.DOCS_SITE_URL }}/api/revalidate/indices" \
-H "Authorization: Bearer ${{ secrets.DOCS_SITE_API_KEY }}" \
-H "Content-Type: application/json" \
-d "$PAYLOAD" \
--max-time 30 \
--fail-with-body \
-o response.json \
-w "%{http_code}" \
-s)
echo ""
echo "Response (HTTP $HTTP_CODE):"
jq '.' response.json || cat response.json
# Check HTTP status
if [ "$HTTP_CODE" != "200" ]; then
echo "::error::Indices revalidation API returned status $HTTP_CODE"
exit 1
fi
# Check success field in response
SUCCESS=$(jq -r '.success' response.json)
if [ "$SUCCESS" != "true" ]; then
echo "::warning::Revalidation completed with errors"
jq -r '.errors[]?' response.json
else
echo "::notice::✅ Successfully revalidated changelog index"
fi