claude-skills/.github/workflows/static.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

72 lines
1.8 KiB
YAML

name: Deploy Documentation to Pages
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:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
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: Cache social cards
uses: actions/cache@v4
with:
path: .cache
key: social-cards-${{ github.run_id }}
restore-keys: social-cards-
- name: Generate skill pages
run: python scripts/generate-docs.py
- name: Build docs
run: |
# Social preview cards are a nice-to-have: if generating them fails
# (fonts, cairo), deploy the site without them rather than not at all.
if ! SOCIAL_CARDS=true mkdocs build --strict; then
echo "::warning::Social cards failed; building without them"
mkdocs build --strict
fi
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: site/
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4