From 6139c716baf1c563054d8f2f2b973ad7329936a2 Mon Sep 17 00:00:00 2001 From: riordanp Date: Mon, 13 Feb 2023 07:29:50 +0000 Subject: [PATCH] Add doc generation job (#450) * Add doc generation job * Debug cargo doc * Checkout submodules * Remove unused build artifacts * Remove debug commands * Build on pushes to dev and main --- .github/workflows/ci-docs.yml | 39 +++++++++++++++++++++++++++++++++++ docs/index.html | 21 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/workflows/ci-docs.yml create mode 100644 docs/index.html diff --git a/.github/workflows/ci-docs.yml b/.github/workflows/ci-docs.yml new file mode 100644 index 000000000..f7e4981e5 --- /dev/null +++ b/.github/workflows/ci-docs.yml @@ -0,0 +1,39 @@ +name: Build Docs + +on: + push: + branches: [ main, dev ] + + workflow_dispatch: + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: true + + - name: Cache + uses: actions/cache@v2 + id: node-cache + with: + path: node_modules + key: node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }} + + - name: Install dependencies + if: steps.node-cache.outputs.cache-hit != 'true' + run: yarn install --frozen-lockfile + + - name: Build TS Client Docs + run: yarn typedoc ts/client/src/index.ts --readme none --out ./docs/ts/client/ + + - name: Build Rust Docs + run: cargo doc --no-deps --package client --package mango-v4 --target-dir ./docs/rs/ && rm -rf ./docs/rs/debug + + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@4.1.5 + with: + branch: gh-pages + folder: docs \ No newline at end of file diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 000000000..c0061f9b5 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,21 @@ + + mango-v4 docs + + + + + + +

mango-v4 docs

+ +
+ +