Skip to content

Commit

Permalink
Merge pull request #10 from hildjj/generate-docs
Browse files Browse the repository at this point in the history
Generate docs server-side
  • Loading branch information
hildjj authored Nov 20, 2024
2 parents 9cf8f33 + 3a632f9 commit b2d78ac
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy to GitHub Pages

on:
workflow_dispatch:
inputs:
branch:
type: choice
description: Which branch to deploy?
required: true
options:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- name: Enable pnpm
run: "corepack enable"
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: pnpm
- run: pnpm install
- run: npm run build
- run: npm run docs
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- run: pnpm i -r
- run: npm run build
- run: npm run test
- run: npm run docs
- run: npm pkg delete devDependencies scripts packageManager
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v4
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
},
"scripts": {
"build": "peggy --format es test/minimal.peggy && tsc",
"docs": "typedoc",
"lint": "eslint .",
"test": "c8 node --test test/*.test.js"
},
Expand Down

0 comments on commit b2d78ac

Please sign in to comment.