-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (51 loc) · 1.48 KB
/
deploy-docusaurus.yml
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
name: Generate Docs and Deploy Docusaurus
on:
push:
branches:
- main
- docusaurus
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: docusaurus
fetch-depth: 0
- name: Fetch schemas and package files from main
run: |
git fetch origin main
git checkout origin/main -- src/schemas src/errors package.json package-lock.json
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install zod2md
run: npm install zod2md
- name: Install schema dependencies
run: npm install
working-directory: ./
- name: Install dependencies
run: npm install
working-directory: ./docusaurus
- name: Generate schema documentation
run: npm run gendocs
working-directory: ./docusaurus
- name: Debug
run: |
tree src/schemas
tree ./docusaurus/docs/
cat ./docusaurus/docs/sdo/asset.schema.md
- name: Build Docusaurus site
run: npm run build
working-directory: ./docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.DEPLOY_KEY }}
publish_dir: ./docusaurus/build