-
Notifications
You must be signed in to change notification settings - Fork 12
55 lines (43 loc) · 1.38 KB
/
publish-site.yaml
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
name: Publish Site
on:
workflow_dispatch:
push:
branches: [main]
env:
OUTPUT_DIR: site-docs/
jobs:
publish-site:
name: Publish Site
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.12.0 # keep in sync with 'engines'@package.json
- name: Install Dependencies
run: npm install
- name: Build Site
run: npm run build
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Generate Schema
run: |
python3 -m pip install json-schema-for-humans
generate-schema-doc --config-file generate-schema.yaml static/schemas/component-descriptor-v2 schema-v2.html
generate-schema-doc --config-file generate-schema.yaml static/schemas/component-descriptor-v3alpha1 schema-v3alpha1.html
- name: Copy Schema
run: |
cp schema-v2.html schema-v3alpha1.html schema_doc.css schema_doc.min.js public/docs/overview/specification
- name: Publish as GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public