Merge pull request #219 from maxnorm/docs/posthog #104
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: Documentation | |
| on: | |
| pull_request: | |
| paths: | |
| - 'website/**' | |
| - '.github/workflows/docs.yml' | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'website/**' | |
| jobs: | |
| lint-and-build: | |
| name: Lint and Build Docs | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: website | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: website/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build documentation | |
| run: npm run build | |
| env: | |
| # Prevent build failures from missing Algolia keys in PRs | |
| ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID || 'dummy' }} | |
| ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY || 'dummy' }} | |
| ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME || 'compose' }} | |
| POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY || 'dummy' }} | |