-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (75 loc) · 2.74 KB
/
Copy pathdeploy.yml
File metadata and controls
88 lines (75 loc) · 2.74 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
name: Deploy site
on:
push:
branches: [main]
workflow_dispatch:
# Pick up docs changes in component repos (no cross-repo push trigger yet).
schedule:
- cron: "0 6 * * *"
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
name: Build site
runs-on: ubuntu-latest
steps:
- name: Checkout site (this repo)
uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install site dependencies
run: pip install -r requirements.txt
# --- Import component docs ---------------------------------------------
# Each component repo contributes only its docs/ markdown; this site owns
# all config. To add a repo: check it out and copy its docs into
# docs/<section>/ (its .pages files travel with it and drive the nav).
- name: Checkout fiberpath/fiberpath
uses: actions/checkout@v7
with:
repository: fiberpath/fiberpath
path: components/fiberpath
- name: Import fiberpath docs
run: |
dest="docs/fiberpath"
rm -rf "$dest" && mkdir -p "$dest"
cp -R components/fiberpath/docs/. "$dest/"
# GUI docs live beside the GUI code; fold them in under gui/
mkdir -p "$dest/gui"
cp -R components/fiberpath/fiberpath_gui/docs/. "$dest/gui/"
# -----------------------------------------------------------------------
- name: Build site
run: mkdocs build --strict
# Publish the canonical .wind JSON Schema at its $id path. Sourced live from
# fiberpath/fiberpath's generated artifact (checked out above) — no vendored
# copy to drift. Done post-build so mkdocs --strict never processes it; the
# $id is major-only, so every additive 1.x schema serves from /schemas/wind/1/.
- name: Publish .wind JSON Schema ($id)
run: |
mkdir -p site/schemas/wind/1
cp components/fiberpath/fiberpath_gui/schemas/wind-schema.json \
site/schemas/wind/1/wind.schema.json
# Fail loudly if the published $id doesn't match its serving URL.
grep -q '"https://fiberpath.org/schemas/wind/1/wind.schema.json"' \
site/schemas/wind/1/wind.schema.json
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v5
with:
path: site
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 to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5