Skip to content

feat: implement theme management with navigation support and remove o… #21

feat: implement theme management with navigation support and remove o…

feat: implement theme management with navigation support and remove o… #21

Workflow file for this run

name: Deploy web
# Every action is pinned to a commit SHA, with its tag in the trailing comment.
# A tag can be moved; a SHA cannot, so a compromised action cannot reach this
# workflow through a re-pointed tag. `inertia` and `sdk-compat` pin the same
# way. Bump with the tag comment and the SHA together, never one alone.
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .nvmrc
cache: yarn
- run: yarn install --frozen-lockfile
- run: yarn export:web
# GitHub Pages serves this file for unknown paths
- run: cp dist/+not-found.html dist/404.html
- uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
# ci.yml reads the export; only the live host proves that a crawler gets
# the page: the status code, `robots.txt`, and the served head. Lighthouse
# runs on the deployed URL and fails the workflow below an SEO score of
# 100. The deploy has happened by then; a red run is the signal. The run id
# busts the Pages edge cache, which can hold the previous deploy for ten
# minutes. The ubuntu runner has Chrome; Lighthouse comes from npx at the
# version the script pins. `ui` runs the same script on the docs and the demo.
lighthouse:
needs: deploy
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .nvmrc
package-manager-cache: false
- run: node scripts/lighthouse-seo.mjs --bust ${{ github.run_id }} https://rootnative.github.io/