fix(portal): ignore prose in snip Seen-on values #43
Workflow file for this run
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 Portal | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'portal/**' | |
| - '**/configuration/snips/**' | |
| - '.github/workflows/portal-deploy.yml' | |
| pull_request: | |
| paths: | |
| - 'portal/**' | |
| - '**/configuration/snips/**' | |
| - '.github/workflows/portal-deploy.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: portal | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Verify snip library is up to date | |
| run: | | |
| if ! node scripts/generate-snips.mjs --check; then | |
| echo "::error file=portal/src/data/snips.json,title=snips.json is out of date::Run \`node portal/scripts/generate-snips.mjs\` locally and commit the regenerated portal/src/data/snips.json" | |
| exit 1 | |
| fi | |
| - name: Build | |
| run: bun run build | |
| - name: Copy index.html to 404.html (SPA fallback) | |
| run: cp dist/index.html dist/404.html | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: portal-dist | |
| path: portal/dist | |
| retention-days: 7 | |
| deploy: | |
| needs: build | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download build artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: portal-dist | |
| path: dist | |
| - name: Deploy to gh-pages/portal | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: gh-pages | |
| publish_dir: ./dist | |
| destination_dir: portal | |
| keep_files: true | |
| commit_message: "Deploy portal: ${{ github.sha }}" |