Skip to content

Stabilize browser QA on GitHub-hosted runners (#2) #5

Stabilize browser QA on GitHub-hosted runners (#2)

Stabilize browser QA on GitHub-hosted runners (#2) #5

Workflow file for this run

name: Test and deploy Probably
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true
jobs:
quality:
name: Test and build
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
- name: Run deterministic tests
run: npm test
- name: Check JavaScript syntax
run: npm run check
- name: Assemble static site
run: npm run build
- name: Run browser interaction QA
run: npm run qa:browser
- name: Configure GitHub Pages
if: github.event_name != 'pull_request'
uses: actions/configure-pages@v5
- name: Upload Pages artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v4
with:
path: _site
deploy:
name: Deploy to GitHub Pages
if: github.event_name != 'pull_request'
needs: quality
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4