feat: add Algolia DocSearch to documentation site #43
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: CI | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| type-check: | |
| name: Type Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run TypeScript check | |
| run: npm run typecheck | |
| build: | |
| name: Build Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build documentation | |
| run: npm run build | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs-build | |
| path: build/ | |
| retention-days: 1 | |
| validate-sitemap: | |
| name: Validate Sitemap Generation | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| steps: | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: docs-build | |
| path: build/ | |
| - name: Verify sitemap exists | |
| run: | | |
| if [ -f "build/sitemap.xml" ]; then | |
| echo "✅ Sitemap generated successfully" | |
| echo "📄 Sitemap preview:" | |
| head -20 build/sitemap.xml | |
| else | |
| echo "❌ Sitemap not found!" | |
| exit 1 | |
| fi |