-
Notifications
You must be signed in to change notification settings - Fork 5
89 lines (74 loc) · 2.05 KB
/
Copy pathdocs.yml
File metadata and controls
89 lines (74 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Deploy Documentation
on:
push:
branches:
- main
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'skills/**'
- 'commands/**'
- 'agents/**'
- 'scripts/generate_docs.py'
workflow_dispatch:
inputs:
version:
description: 'Version to deploy (e.g., 1.0.0, latest)'
required: false
default: 'latest'
permissions:
contents: write
pages: write
id-token: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install mkdocs-material mike
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Generate docs from skills/commands/agents
run: python3 scripts/generate_docs.py
- name: Fetch gh-pages
run: git fetch origin gh-pages --depth=1 || true
- name: Deploy with mike
run: |
VERSION=${{ github.event.inputs.version || 'latest' }}
if [ "$VERSION" = "latest" ]; then
mike deploy --push $VERSION
else
mike deploy --push --update-aliases $VERSION latest
fi
mike set-default --push latest
# Build job for PR previews
build:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install dependencies
run: pip install mkdocs-material mike
- name: Generate docs
run: python3 scripts/generate_docs.py
- name: Build docs
run: mkdocs build --strict
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: docs-preview
path: site/