Skip to content

Commit e4eff1f

Browse files
committed
Publish the designer, too
1 parent 9c5553f commit e4eff1f

2 files changed

Lines changed: 44 additions & 2 deletions

File tree

.github/workflows/pages.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,22 @@ jobs:
2222
- name: Check out repository
2323
uses: actions/checkout@v4
2424

25+
- name: Check out Freenit source repository
26+
uses: actions/checkout@v4
27+
with:
28+
repository: freenit-framework/devops
29+
path: freenit
30+
2531
- name: Set up Python
2632
uses: actions/setup-python@v5
2733
with:
2834
python-version: "3.12"
2935

36+
- name: Set up Node.js
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: "22"
40+
3041
- name: Install documentation dependencies
3142
run: |
3243
python -m pip install --upgrade pip
@@ -36,9 +47,38 @@ jobs:
3647
mkdocs-awesome-pages-plugin \
3748
pymdown-extensions
3849
50+
- name: Install designer dependencies
51+
working-directory: freenit/services/designer
52+
run: npm ci
53+
54+
- name: Generate designer components
55+
working-directory: freenit/services/designer
56+
run: OFFLINE=yes ./bin/components.sh
57+
58+
- name: Build designer
59+
working-directory: freenit/services/designer
60+
run: npm run build
61+
3962
- name: Build site
4063
run: mkdocs build --strict
4164

65+
- name: Add designer to published site
66+
run: |
67+
echo "designer/build contents:"
68+
find freenit/services/designer/build -maxdepth 2 -type f | sort || true
69+
70+
mkdir -p site/design
71+
cp -R freenit/services/designer/build/. site/design/
72+
touch site/.nojekyll
73+
74+
echo "site/design contents:"
75+
find site/design -maxdepth 2 -type f | sort || true
76+
77+
- name: Verify published designer files
78+
run: |
79+
find site/design -maxdepth 2 -type f | sort
80+
test -f site/design/index.html
81+
4282
- name: Upload Pages artifact
4383
uses: actions/upload-pages-artifact@v3
4484
with:

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ The MkDocs deployment guide explains that user/organization Pages deployments wi
2525
Instead, publishing is handled by GitHub Actions in [`.github/workflows/pages.yml`](/home/meka/repos/freenit-framework.github.io/.github/workflows/pages.yml). On each push to `master`, the workflow:
2626

2727
1. installs MkDocs and the required plugins,
28-
2. builds the site with `mkdocs build --strict`,
29-
3. deploys the generated `site/` output to GitHub Pages.
28+
2. checks out and builds the `freenit-framework/designer` repository,
29+
3. builds the site with `mkdocs build --strict`,
30+
4. copies the designer static build into `site/design/`,
31+
5. deploys the generated `site/` output to GitHub Pages.
3032

3133
## One-time GitHub configuration
3234

0 commit comments

Comments
 (0)