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: Build and Deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| 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: Lint code | |
| run: npm run lint | |
| - name: Run tests | |
| run: npm test | |
| - name: Build library | |
| run: npm run build | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./ | |
| publish_branch: gh-pages | |
| exclude_assets: | | |
| node_modules/ | |
| src/ | |
| tests/ | |
| scripts/ | |
| .github/ | |
| package*.json | |
| rollup.config.js | |
| jest.config.js | |
| .eslintrc.js | |
| .gitignore | |
| PROJECT-STATUS.md | |
| PERFORMANCE-CLEANUP.md | |
| LLMS-IMPLEMENTATION.md | |
| # Explicitly include important files | |
| include_assets: | | |
| dist/ | |
| examples/ | |
| index.html | |
| README.md | |
| llms.txt | |
| .nojekyll | |
| _config.yml | |
| robots.txt |