mirror of
https://github.com/classchartsapi/classcharts-api-js.git
synced 2026-05-14 19:59:37 +00:00
43 lines
948 B
YAML
43 lines
948 B
YAML
name: Docs
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
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: 8.2.0
|
|
- name: Retrieve the cache
|
|
uses: actions/cache@v3
|
|
id: node-cache
|
|
with:
|
|
path: node_modules
|
|
key: node-modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
|
|
|
|
- name: Install dependencies
|
|
if: steps.node-cache.outputs.cache-hit != 'true'
|
|
run: pnpm install
|
|
|
|
- name: Build
|
|
run: pnpm run build
|
|
|
|
- name: Generate typedoc
|
|
run: pnpm generateDocs
|
|
|
|
- name: Deploy 🚀
|
|
uses: JamesIves/github-pages-deploy-action@v4
|
|
with:
|
|
branch: gh-pages
|
|
folder: docs
|