46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
name: Reference site
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '24'
|
|
cache: npm
|
|
cache-dependency-path: site/package-lock.json
|
|
- name: Install
|
|
working-directory: site
|
|
run: npm ci
|
|
- name: Check and build
|
|
working-directory: site
|
|
run: npm run verify
|
|
- name: Browser smoke tests
|
|
working-directory: site
|
|
run: |
|
|
npx playwright install --with-deps chromium
|
|
npm run test:browser
|
|
- name: Verify subpath deployment
|
|
working-directory: site
|
|
run: |
|
|
SITE_BASE=/reference SITE_URL=https://example.test npm run verify
|
|
SITE_BASE=/reference npm run test:browser
|
|
- name: Build deployment artifact
|
|
working-directory: site
|
|
env:
|
|
SITE_URL: ${{ vars.SITE_URL }}
|
|
SITE_BASE: ${{ vars.SITE_BASE }}
|
|
run: npm run build && npm run check:links
|
|
# Gitea uses the v3 artifact protocol, not GitHub's v4 artifact service.
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: wip-reference-site
|
|
path: site/dist/
|
|
if-no-files-found: error
|