-
Notifications
You must be signed in to change notification settings - Fork 4
92 lines (77 loc) · 2.54 KB
/
docs.yml
File metadata and controls
92 lines (77 loc) · 2.54 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
name: Build and Publish Docs (Vue + Django)
on:
push:
branches: [ main ]
workflow_dispatch:
# Permissions required for GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Ensure only one pages deployment runs at a time
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
name: Build docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Configure Pages
uses: actions/configure-pages@v6
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
node-version: '22'
cache-dependency-path: 'vue/package-lock.json'
- name: Install and build Vue Storybook
working-directory: vue
run: |
npm ci
npm run build-storybook
- name: Setup Python and install deps
uses: ./.github/actions/setup-python
with:
python-version: '3.12'
install-dev: 'false'
- name: Prepare Pages content
env:
DJANGO_SETTINGS_MODULE: demo.settings
run: |
set -e
mkdir -p gh-pages/vue gh-pages/django gh-pages/assets
# Copy Vue Storybook (if present) under /vue
if [ -d "vue/storybook-static" ]; then
cp -r vue/storybook-static/* gh-pages/vue/
else
echo "<html><body><h1>Vue docs</h1><p>No Storybook build found.</p></body></html>" > gh-pages/vue/index.html
fi
# Install Python deps and Sphinx (via uv), generate Django docs from nside_wefa
cd django
uv pip install --python "$VIRTUAL_ENV" sphinx
uv run sphinx-build -b html docs/source ../gh-pages/django
cd ..
# Build Tailwind CSS for the landing page
npm install tailwindcss @tailwindcss/cli
npx --yes @tailwindcss/cli@latest -i .github/page/input.css -o gh-pages/assets/tailwind.css --minify --content .github/page/index.html
# Use tracked landing page for the portal
cp .github/page/index.html gh-pages/index.html
# Disable Jekyll on GitHub Pages artifact
touch gh-pages/.nojekyll
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v5
with:
path: gh-pages
deploy:
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v5