Skip to content

Commit 76f16a7

Browse files
committed
chore: github workflows
1 parent 4caed3c commit 76f16a7

2 files changed

Lines changed: 54 additions & 29 deletions

File tree

‎.github/workflows/docs.yml‎

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Documentation
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- main
7+
paths:
8+
- 'packages/**/docs/**'
9+
- 'packages/**/zensical.toml'
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
jobs:
15+
deploy:
16+
environment:
17+
name: github-pages
18+
url: ${{ steps.deployment.outputs.page_url }}
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/configure-pages@v5
22+
- uses: actions/checkout@v4
23+
- uses: actions/setup-python@v5
24+
with:
25+
python-version: 3.x
26+
- run: pip install zensical
27+
- run: |
28+
mkdir -p public_site
29+
for pkg in packages/*; do
30+
if [ -f "$pkg/zensical.toml" ]; then
31+
echo "Building docs for $(basename $pkg)..."
32+
cd $pkg
33+
zensical build --clean
34+
cd -
35+
mv "$pkg/site" "public_site/$(basename $pkg)"
36+
fi
37+
done
38+
39+
cat << 'EOF' > public_site/index.html
40+
<!DOCTYPE html>
41+
<html>
42+
<head>
43+
<meta http-equiv="refresh" content="0; url=./aikit/" />
44+
</head>
45+
<body>
46+
<p>Redirecting to <a href="./aikit/">AiKit Docs</a>...</p>
47+
</body>
48+
</html>
49+
EOF
50+
- uses: actions/upload-pages-artifact@v3
51+
with:
52+
path: public_site
53+
- uses: actions/deploy-pages@v4
54+
id: deployment

‎packages/aikit/.githubxx/workflows/docs.yml‎

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)