Skip to content

Commit

Permalink
feat: api reports & docs
Browse files Browse the repository at this point in the history
auto-gen api reports and docs
  • Loading branch information
zeyu2001 authored Jul 23, 2024
1 parent f77d847 commit 568b4f2
Show file tree
Hide file tree
Showing 35 changed files with 2,584 additions and 21 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Documentation

on:
push:
branches: [develop]

permissions:
id-token: write
pages: write
contents: write
packages: write

jobs:
publish-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v4

- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: lts/*
cache: pnpm
registry-url: "https://registry.npmjs.org/"
scope: "@opengovsg"

- name: Install Dependencies
run: |
pnpm i --frozen-lockfile
npm install -g @microsoft/api-documenter
npm install -g @microsoft/api-extractor
- name: Check API report
run: pnpm ci:report

- name: Generate documentation
run: pnpm build:docs

- name: Upload to GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: apps/docs/.vitepress/dist

- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
run: pnpm install

- name: Lint 🛀
run: pnpm -r run lint
run: pnpm lint
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: release
name: Release

on:
push:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ jobs:
run: pnpm install

- name: Run tests
run: |
pnpm -r run test
run: pnpm test

build:
runs-on: ubuntu-latest
Expand All @@ -48,4 +47,4 @@ jobs:

- name: Compile
run: |
pnpm -r run build
pnpm build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ coverage
out/
build
dist
cache


# Debug
Expand Down
Loading

0 comments on commit 568b4f2

Please sign in to comment.