Merge pull request #283 from githubnext/fix/remove-opus-model-override #106
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: Deploy Playground to Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| name: Build Playground | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Build library for browser | |
| run: bun build ./src/index.ts --outdir ./playground/dist --target browser --minify | |
| - name: Bundle TypeScript compiler for offline playground | |
| run: cp node_modules/typescript/lib/typescript.js ./playground/dist/typescript.js | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Python dependencies | |
| run: pip install pandas numpy | |
| - name: Run benchmarks | |
| run: bash benchmarks/run_benchmarks.sh | |
| - name: Copy benchmark results to playground | |
| run: | | |
| mkdir -p ./playground/benchmarks | |
| cp benchmarks/results.json ./playground/benchmarks/results.json | |
| - name: Validate Python playground examples | |
| run: python scripts/validate-python-examples.py playground/ | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| with: | |
| enablement: true | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: playground/ | |
| deploy: | |
| name: Deploy to Pages | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |