Skip to content

style(site): JSDoc tags stay prose-sized but dimmer; highlight meande… #67

style(site): JSDoc tags stay prose-sized but dimmer; highlight meande…

style(site): JSDoc tags stay prose-sized but dimmer; highlight meande… #67

Workflow file for this run

name: 📘 Tour (GH Pages)
# Deploys the tour pilot to https://socketdev.github.io/socket-packageurl-js/
# Trigger: push to main that touches tour sources (plus manual).
#
# Uses the SocketDev/socket-registry shared composite action for
# checkout + Node/pnpm setup + install, so toolchain versions stay in
# sync with the rest of the fleet. The build/deploy steps are custom
# because there isn't a shared Pages workflow yet (worth PR'ing to
# socket-registry once we've shipped this and validated the pattern).
#
# Build model:
# 1. Shared setup-and-install → checkout w/ submodules, pnpm install.
# 2. `pnpm tour:build` — the `CI` env var (set by all GitHub
# Actions runners) makes this auto-select the `prod` preset, which
# applies --minify + --base-path=/socket-packageurl-js. Locally the
# same script defaults to `dev`. No flag drift between CI and the
# npm script.
# 3. Upload `pages/` as the Pages artifact. (Meander hardcodes its
# output directory name; scripts/tour.mts renames the finished
# tree to pages/ before upload.)
# 4. Deploy via actions/deploy-pages.
on:
push:
branches: [main]
paths:
- 'tour.json'
- 'comments.js'
- 'drag.js'
- 'overrides.css'
- 'sw.js'
- 'scripts/tour.mts'
- 'src/**'
- 'docs/**'
- 'assets/favicon/**'
- '.github/workflows/pages.yml'
- 'package.json'
- 'pnpm-lock.yaml'
workflow_dispatch:
# Default workflow-level permissions are read-only. Each job opts in
# to the narrower scope it needs — build doesn't touch Pages at all
# (just uploads an artifact), deploy gets pages + id-token.
permissions:
contents: read
# Queue Pages deploys serially — don't cancel a running deploy with a
# newer commit (`cancel-in-progress: false`), that can leave the site
# in a half-deployed state.
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
name: Build tour
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Setup and install (checkout + Node + pnpm + install)
uses: SocketDev/socket-registry/.github/actions/setup-and-install@13684cd82b9fdf2c389e2e808504014362f39655 # main
with:
checkout-fetch-depth: '1'
# The fleet's shared checkout action doesn't init submodules.
# We need upstream/meander because the generate step shells out
# to its CLI. Init non-recursively at the pinned commit the
# superrepo points at — no re-resolving from meander upstream.
- name: Init meander submodule
run: git submodule update --init --depth=1 upstream/meander
- name: Generate tour (auto-prod via CI env)
run: pnpm tour:build
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: pages
deploy:
name: Deploy to Pages
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- name: Deploy
id: deploy
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0