Skip to content

Commit 80c507a

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

2 files changed

Lines changed: 46 additions & 2 deletions

File tree

.github/workflows/pages.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,24 @@ 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+
cache: npm
41+
cache-dependency-path: freenit/services/designer/package-lock.json
42+
3043
- name: Install documentation dependencies
3144
run: |
3245
python -m pip install --upgrade pip
@@ -36,9 +49,38 @@ jobs:
3649
mkdocs-awesome-pages-plugin \
3750
pymdown-extensions
3851
52+
- name: Install designer dependencies
53+
working-directory: freenit/services/designer
54+
run: npm ci
55+
56+
- name: Generate designer components
57+
working-directory: freenit/services/designer
58+
run: OFFLINE=yes ./bin/components.sh
59+
60+
- name: Build designer
61+
working-directory: freenit/services/designer
62+
run: npm run build
63+
3964
- name: Build site
4065
run: mkdocs build --strict
4166

67+
- name: Add designer to published site
68+
run: |
69+
echo "designer/build contents:"
70+
find freenit/services/designer/build -maxdepth 2 -type f | sort || true
71+
72+
mkdir -p site/design
73+
cp -R freenit/services/designer/build/. site/design/
74+
touch site/.nojekyll
75+
76+
echo "site/design contents:"
77+
find site/design -maxdepth 2 -type f | sort || true
78+
79+
- name: Verify published designer files
80+
run: |
81+
find site/design -maxdepth 2 -type f | sort
82+
test -f site/design/index.html
83+
4284
- name: Upload Pages artifact
4385
uses: actions/upload-pages-artifact@v3
4486
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)