claude-skills/.github/workflows/docs-preview.yml
Claude c0d099deaf
docs(site): six tabs, start-here picks, search ranking, social cards, traffic history
- Nav: 12 top tabs down to 6 (Home, Skills, Plugins, Agents, Commands,
  Other Tools); Personas and Orchestration sit under Agents, guides and
  Custom GPTs under Other Tools. The hook keeps hand-written entries next
  to the generated ones.
- Domain pages: a "Start here" row of up to three picks per domain
  (scripts/docs_start_here.json, checked by G14), one card per plugin
  group so plugin-packaged skills (karpathy-coder, agenthub, ...) are no
  longer missing from the grid, card text from the skill description, and
  the same per-domain count the homepage shows.
- Search: skill pages boosted 2x, agent and command pages 0.5x, so a
  query lands on the skill before the wrappers that duplicate it.
- Social cards: Material social plugin, on only for the Pages deploy
  (SOCIAL_CARDS=true) with a fallback build without cards; main.html
  emits its own OG/Twitter tags only when the plugin is off.
- docs-preview.yml builds docs PRs the way Pages deploys them and uploads
  the site as an artifact.
- traffic-snapshot.yml saves GitHub's 14-day traffic data daily to a
  metrics branch; it does nothing until a TRAFFIC_TOKEN secret exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L8KYFH1Jfe2JqY8uFr4aBx
2026-11-04 18:46:18 +00:00

54 lines
1.5 KiB
YAML

name: Docs preview
# Builds the site exactly as static.yml deploys it (social cards on) for any PR
# that touches the docs pipeline, and uploads it as an artifact to review.
on:
pull_request:
branches: [dev, main]
paths:
- "docs/**"
- "mkdocs.yml"
- "scripts/generate-docs.py"
- "scripts/docs_hooks.py"
- "scripts/docs_*.json"
- ".github/workflows/static.yml"
- ".github/workflows/docs-preview.yml"
permissions:
contents: read
concurrency:
group: docs-preview-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install MkDocs Material + plugins
run: |
sudo apt-get update -qq && sudo apt-get install -y -qq libcairo2 >/dev/null
pip install mkdocs==1.6.1 "mkdocs-material[imaging]==9.8.0" mkdocs-redirects==1.2.3
- name: Build with social cards
run: SOCIAL_CARDS=true mkdocs build --strict
- name: Check social card meta tags
run: |
page=site/skills/engineering/docker-development/index.html
test "$(grep -c 'property="og:image"' "$page")" -eq 1
grep -o 'property="og:image" content="[^"]*"' "$page"
ls site/assets/images/social | head
- uses: actions/upload-artifact@v4
with:
name: docs-site-preview
path: site
retention-days: 7