-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (50 loc) · 1.57 KB
/
docs.yml
File metadata and controls
51 lines (50 loc) · 1.57 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
name: Documentation
on:
push:
branches:
- master
- main
paths:
- ".github/workflows/docs.yml"
- "packages/**/docs/**"
- "packages/**/zensical.toml"
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/configure-pages@v5
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: pip install zensical
- run: |
mkdir -p public_site
for pkg in packages/*; do
if [ -f "$pkg/zensical.toml" ]; then
echo "Building docs for $(basename $pkg)..."
cd $pkg
zensical build --clean
cd -
mv "$pkg/site" "public_site/$(basename $pkg)"
fi
done
cat << 'EOF' > public_site/index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=./aikit/" />
</head>
<body>
<p>Redirecting to <a href="./aikit/">AiKit Docs</a>...</p>
</body>
</html>
EOF
- name: Deploy to codeworksh.github.io
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.DOCS_DEPLOY_TOKEN }}
external_repository: codeworksh/codeworksh.github.io
publish_branch: main
publish_dir: ./public_site