Skip to content

Commit 2c54e1a

Browse files
mohnjilesclaude
andcommitted
docs: add VitePress site scaffold and deploy workflow
Static docs site built from the existing docs/ tree, no restructuring: - docs/.vitepress/config.mts: README.md rewritten to site index, sidebar for existing pages only, dead-link checking kept on so broken relative links fail the build - Site tooling contained in docs/ (package.json, lockfile, gitignore) so the repo root stays .NET-only - .github/workflows/docs-site.yml: build + deploy to Azure Static Web Apps (AZURE_STATIC_WEB_APPS_API_TOKEN_DOCS secret) on docs/** pushes to main; build-check only on PRs Verified locally: npm ci + vitepress build passes with zero dead links. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 7706cee commit 2c54e1a

5 files changed

Lines changed: 2694 additions & 0 deletions

File tree

.github/workflows/docs-site.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Docs Site
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'docs/**'
8+
pull_request:
9+
paths:
10+
- 'docs/**'
11+
workflow_dispatch:
12+
13+
concurrency:
14+
group: docs-site-${{ github.event.pull_request.number || github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build_and_deploy:
19+
if: github.event_name != 'pull_request'
20+
runs-on: ubuntu-latest
21+
name: Build and deploy docs site
22+
permissions:
23+
contents: read
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Set up Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: '20'
31+
cache: 'npm'
32+
cache-dependency-path: docs/package-lock.json
33+
34+
- name: Install dependencies
35+
working-directory: docs
36+
run: npm ci
37+
38+
- name: Build VitePress site
39+
working-directory: docs
40+
run: npx vitepress build .
41+
42+
- name: Deploy to Azure Static Web Apps
43+
uses: Azure/static-web-apps-deploy@v1
44+
with:
45+
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_DOCS }}
46+
repo_token: ${{ secrets.GITHUB_TOKEN }}
47+
action: upload
48+
app_location: 'docs/.vitepress/dist'
49+
skip_app_build: true
50+
51+
build_check:
52+
if: github.event_name == 'pull_request'
53+
runs-on: ubuntu-latest
54+
name: Build check (docs site)
55+
permissions:
56+
contents: read
57+
steps:
58+
- uses: actions/checkout@v4
59+
60+
- name: Set up Node.js
61+
uses: actions/setup-node@v4
62+
with:
63+
node-version: '20'
64+
cache: 'npm'
65+
cache-dependency-path: docs/package-lock.json
66+
67+
- name: Install dependencies
68+
working-directory: docs
69+
run: npm ci
70+
71+
- name: Build VitePress site
72+
working-directory: docs
73+
run: npx vitepress build .

docs/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
.vitepress/dist
3+
.vitepress/cache

docs/.vitepress/config.mts

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
export default defineConfig({
4+
title: 'Stability Matrix Docs',
5+
description: 'Documentation for Stability Matrix, a multi-platform package manager for Stable Diffusion and related AI tools.',
6+
7+
// Keep README.md as the single source of truth for the home page content,
8+
// while serving it at the site root (index.html) instead of /README.html.
9+
rewrites: {
10+
'README.md': 'index.md'
11+
},
12+
13+
// Dead-link checking stays ON (default) so a future PR that breaks a
14+
// relative link fails the build instead of shipping silently.
15+
ignoreDeadLinks: false,
16+
17+
appearance: 'dark',
18+
19+
themeConfig: {
20+
outline: 'deep',
21+
22+
nav: [
23+
{ text: 'Home', link: '/' },
24+
{ text: 'Getting Started', link: '/getting-started/overview' },
25+
{ text: 'Package Manager', link: '/package-manager/overview' },
26+
{ text: 'Inference', link: '/inference/overview' },
27+
{ text: 'Advanced', link: '/advanced/overview' },
28+
{ text: 'Tips and Tricks', link: '/tips/overview' }
29+
],
30+
31+
sidebar: {
32+
'/getting-started/': [
33+
{
34+
text: 'Getting Started',
35+
items: [
36+
{ text: 'Overview', link: '/getting-started/overview' },
37+
{ text: 'Installation', link: '/getting-started/installation' },
38+
{ text: 'First Launch', link: '/getting-started/first-launch' },
39+
{ text: 'Data Directory', link: '/getting-started/data-directory' }
40+
]
41+
}
42+
],
43+
'/package-manager/': [
44+
{
45+
text: 'Package Manager',
46+
items: [
47+
{ text: 'Overview', link: '/package-manager/overview' },
48+
{ text: 'Supported Packages', link: '/package-manager/supported-packages' },
49+
{ text: 'Installing Packages', link: '/package-manager/installing-packages' }
50+
]
51+
}
52+
],
53+
'/inference/': [
54+
{
55+
text: 'Inference',
56+
items: [
57+
{ text: 'Overview', link: '/inference/overview' }
58+
]
59+
}
60+
],
61+
'/advanced/': [
62+
{
63+
text: 'Advanced',
64+
items: [
65+
{ text: 'Overview', link: '/advanced/overview' },
66+
{ text: 'ComfyUI Integration', link: '/advanced/comfyui-integration' },
67+
{ text: 'Environment Variables', link: '/advanced/environment-variables' }
68+
]
69+
}
70+
],
71+
'/tips/': [
72+
{
73+
text: 'Tips and Tricks',
74+
items: [
75+
{ text: 'Overview', link: '/tips/overview' },
76+
{ text: 'Terminology', link: '/tips/terminology' }
77+
]
78+
}
79+
]
80+
},
81+
82+
socialLinks: [
83+
{ icon: 'github', link: 'https://github.com/LykosAI/StabilityMatrix' }
84+
]
85+
}
86+
})

0 commit comments

Comments
 (0)