Skip to content

Refactor table styles to _tables.scss and fix AI page tables #24

Refactor table styles to _tables.scss and fix AI page tables

Refactor table styles to _tables.scss and fix AI page tables #24

Workflow file for this run

name: PR Preview
on:
pull_request:
branches:
- main
paths-ignore:
- 'docs/**'
- 'adrs/**'
- '.gemini/**'
- '**/README.md'
workflow_dispatch:
permissions:
checks: write
contents: read
pull-requests: write
# Default to bash
defaults:
run:
shell: bash
jobs:
build_drafts_off:
runs-on: ubuntu-latest
outputs:
preview_url: ${{ steps.deploy.outputs.details_url }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.147.9'
extended: true
- name: Build Svelte components
run: |
# Build Svelte apps and move generated files into position
./svelte/build.sh
- name: Build with Hugo
env:
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
HUGO_ENVIRONMENT: production
run: |
hugo --source=./hugo --logLevel=debug --minify
- name: Deploy to Firebase
id: deploy
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.SERVICE_ACCOUNT }}
expires: 30d
projectId: ${{ vars.GOOGLE_CLOUD_PROJECT }}
channelId: pr${{ github.event.pull_request.number || 'manual' }}_drafts_off
build_drafts_on:
runs-on: ubuntu-latest
outputs:
preview_url: ${{ steps.deploy.outputs.details_url }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.147.9'
extended: true
- name: Build Svelte components
run: |
# Build Svelte apps and move generated files into position
./svelte/build.sh
- name: Build with Hugo
env:
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
HUGO_ENVIRONMENT: production
run: |
hugo --source=./hugo --logLevel=debug --buildDrafts --minify
- name: Deploy to Firebase
id: deploy
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.SERVICE_ACCOUNT }}
expires: 30d
projectId: ${{ vars.GOOGLE_CLOUD_PROJECT }}
channelId: pr${{ github.event.pull_request.number || 'manual' }}_drafts_on
# shard tests across multiple workers
test:
strategy:
matrix:
shard: [1, 2, 3, 4]
runs-on: ubuntu-latest
needs: build_drafts_on
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up playwright
working-directory: test/playwright
run: npm ci && npx playwright install --with-deps
- name: Playwright tests
working-directory: test/playwright
env:
PLAYWRIGHT_BASE_URL: ${{needs.build_drafts_on.outputs.preview_url}}
run: |
set -u
npx playwright test --max-failures=1 --shard=${{ matrix.shard }}/${{ strategy.job-total }}