Fix search: remove duplicate results and fix result titles #127
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
| # Workflow for building, testing, and deploying the site | |
| # | |
| name: Build, Test & Deploy | |
| on: | |
| # Runs on pushes for any branch | |
| push: | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Prevent newer runs from canceling older ones; they will queue and wait for the current run to finish. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| # Default to bash | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup Node | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| - name: Setup Pages | |
| id: pages | |
| uses: actions/configure-pages@v6 | |
| with: | |
| # Automatically inject pathPrefix in your Gatsby configuration file. | |
| # | |
| # You may remove this line if you want to manage the configuration yourself. | |
| static_site_generator: gatsby | |
| - name: Restore cache | |
| uses: actions/cache@v6 | |
| with: | |
| path: | | |
| public | |
| .cache | |
| key: ${{ runner.os }}-gatsby-build-${{ hashFiles('public') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gatsby-build- | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build with Gatsby | |
| env: | |
| PREFIX_PATHS: 'true' | |
| SPACE_ID: ${{ secrets.SPACE_ID }} | |
| ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
| run: npm run build | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: ./public | |
| visual-regression: | |
| name: Visual Regression | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup Node | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| - name: Download artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: github-pages | |
| path: ./artifact | |
| - name: Extract artifact | |
| run: | | |
| mkdir -p public | |
| tar -xf ./artifact/artifact.tar -C ./public | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Serve and snapshot | |
| env: | |
| PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} | |
| run: | | |
| npx serve public -l 9000 & | |
| npx wait-on http://localhost:9000 | |
| npx percy snapshot --base-url http://localhost:9000 snapshots.yml | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) | |
| timeout-minutes: 30 | |
| 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@v5 | |
| with: | |
| timeout: "1800000" |