Skip to content

Commit b2d78ac

Browse files
authored
Merge pull request #10 from hildjj/generate-docs
Generate docs server-side
2 parents 9cf8f33 + 3a632f9 commit b2d78ac

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

.github/workflows/gh-pages.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
branch:
7+
type: choice
8+
description: Which branch to deploy?
9+
required: true
10+
options:
11+
- main
12+
13+
jobs:
14+
deploy:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.event.inputs.branch }}
20+
- name: Enable pnpm
21+
run: "corepack enable"
22+
- name: Use Node.js 22.x
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 22.x
26+
cache: pnpm
27+
- run: pnpm install
28+
- run: npm run build
29+
- run: npm run docs
30+
- name: Deploy
31+
uses: peaceiris/actions-gh-pages@v4
32+
with:
33+
github_token: ${{ secrets.GITHUB_TOKEN }}
34+
publish_dir: docs

.github/workflows/publish.yml

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
- run: pnpm i -r
2525
- run: npm run build
2626
- run: npm run test
27+
- run: npm run docs
2728
- run: npm pkg delete devDependencies scripts packageManager
2829
- name: Deploy Docs
2930
uses: peaceiris/actions-gh-pages@v4

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
},
2525
"scripts": {
2626
"build": "peggy --format es test/minimal.peggy && tsc",
27+
"docs": "typedoc",
2728
"lint": "eslint .",
2829
"test": "c8 node --test test/*.test.js"
2930
},

0 commit comments

Comments
 (0)