-
Notifications
You must be signed in to change notification settings - Fork 1
138 lines (119 loc) · 3.84 KB
/
Copy pathdocs.yml
File metadata and controls
138 lines (119 loc) · 3.84 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: Documentation
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'src/**/*.py'
- 'README.md'
- '.github/workflows/docs.yml'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# =============================================================================
# Build Documentation
# =============================================================================
build:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install documentation dependencies
run: |
pip install mkdocs mkdocs-material mkdocstrings[python] mkdocs-gen-files mkdocs-literate-nav
- name: Check for mkdocs.yml
id: check_mkdocs
run: |
if [ -f "mkdocs.yml" ]; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
- name: Generate mkdocs.yml if missing
if: steps.check_mkdocs.outputs.exists == 'false'
run: |
cat > mkdocs.yml << 'EOF'
site_name: AI-OS Documentation
site_description: Autonomous HRM agent with OS integration
site_url: https://wulfic.github.io/AI-OS/
repo_url: https://github.com/Wulfic/AI-OS
repo_name: Wulfic/AI-OS
theme:
name: material
palette:
- media: "(prefers-color-scheme: light)"
scheme: default
primary: indigo
accent: indigo
toggle:
icon: material/brightness-7
name: Switch to dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: indigo
accent: indigo
toggle:
icon: material/brightness-4
name: Switch to light mode
features:
- navigation.instant
- navigation.tracking
- navigation.sections
- navigation.expand
- navigation.top
- search.suggest
- search.highlight
- content.code.copy
plugins:
- search
markdown_extensions:
- pymdownx.highlight:
anchor_linenums: true
- pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true
- admonition
- pymdownx.details
- toc:
permalink: true
nav:
- Home: index.md
- Guide:
- Quick Start: guide/QUICK_START.md
- Index: guide/INDEX.MD
EOF
- name: Prepare docs structure
run: |
# Always sync index.md from README to keep documentation up to date
mkdir -p docs
cp README.md docs/index.md
- name: Build MkDocs site
run: mkdocs build --strict || mkdocs build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'site'
# =============================================================================
# Deploy to GitHub Pages
# =============================================================================
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4