docs: filter side nav with CSS :has() instead of JS #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Export Excalidraw to SVG | |
| on: | |
| push: | |
| paths: | |
| - '**/*.excalidraw' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| export-svg: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install excalidraw-brute-export-cli | |
| run: npm install -g excalidraw-brute-export-cli | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps firefox | |
| - name: Find and export .excalidraw files | |
| run: | | |
| find . -name '*.excalidraw' | while read -r file; do | |
| dir=$(dirname "$file") | |
| base=$(basename "$file" .excalidraw) | |
| echo "Exporting $file → $dir/$base.svg" | |
| excalidraw-brute-export-cli \ | |
| --input "$file" \ | |
| --output "$dir/$base.svg" \ | |
| --format svg \ | |
| --scale 1 | |
| done | |
| - name: Stage and commit updated SVGs | |
| run: | | |
| git add --all '*.svg' | |
| if git diff --cached --quiet; then | |
| echo "No SVG changes to commit" | |
| else | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git commit -m "chore: auto-export Excalidraw → SVG" | |
| git push | |
| fi |