Skip to content

docs: recommend using Microsoft's fetch-event-source #41

docs: recommend using Microsoft's fetch-event-source

docs: recommend using Microsoft's fetch-event-source #41

Workflow file for this run

name: Publish Docs
on:
push:
branches:
- main
paths:
- docs/**
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Revalidate changed pages
run: |
shopt -s globstar
FILES=$(git --no-pager diff --name-only HEAD~1 -- docs/**/*.md | awk 'BEGIN{RS="\n"} {printf "%s%s",sep,$0; sep="&files="}')
curl --silent --fail-with-body "https://mercure.rocks/api/revalidate?secret=${{ secrets.REVALIDATE_TOKEN }}&files=$FILES"