1
0
Fork 0
mirror of https://github.com/classchartsapi/classcharts-api-js.git synced 2026-05-14 03:56:59 +00:00

feat: automatically build docs with github actions

This commit is contained in:
James Cook 2022-11-17 19:02:33 +00:00
parent 8d90e7ab71
commit 5c66e98d45
51 changed files with 47 additions and 7077 deletions

47
.github/workflows/typedoc.yml vendored Normal file
View file

@ -0,0 +1,47 @@
name: Typedoc
on:
push:
branches:
- main
paths:
- "src/**"
- "tsconfig.json"
- "pnpm-lock.yaml"
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2
with:
version: 7.14.2
- name: Retrieve the cached "node_modules" directory (if present)
uses: actions/cache@v3
id: node-cache
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install dependencies (if the cached directory was not found)
if: steps.node-cache.outputs.cache-hit != 'true'
run: pnpm install
- name: Test to see if the project compiles
run: pnpm run build
- name: Create the docs directory locally in CI
run: pnpm typedoc src/main.ts
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs