From 9bd1e4542db4363f2facee28cffc6995152f83e2 Mon Sep 17 00:00:00 2001 From: ctrlc03 <93448202+ctrlc03@users.noreply.github.com> Date: Thu, 7 Dec 2023 11:03:00 +0000 Subject: [PATCH] docs(contracts) - add script to setup website in one go (including running typedoc, and solidity docgen) in order to allow preview via netlify --- .github/scripts/website.sh | 15 +++++++++++++++ .github/workflows/gh-pages.yml | 31 ++----------------------------- 2 files changed, 17 insertions(+), 29 deletions(-) create mode 100755 .github/scripts/website.sh diff --git a/.github/scripts/website.sh b/.github/scripts/website.sh new file mode 100755 index 0000000000..ce50c05189 --- /dev/null +++ b/.github/scripts/website.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e + +# install and build project +npm install && npm run bootstrap && npm run build + +# run typedoc +npm run typedoc + +# run solidity docgen +cd contracts && npm run docs && cd ../ + +# fix typedoc links and add solidity natspec index toc +cd website && npm install && npm run build \ No newline at end of file diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index a5ed2cb304..2409a6872a 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -22,36 +22,9 @@ jobs: node-version: 20 registry-url: "https://registry.npmjs.org" - - name: Install dependencies and build project + - name: Build website run: | - npm install - npm run bootstrap - npm run build - - - name: Run typedoc - run: | - npm run typedoc - - - name: Run Solidity Docgen - run: | - npm run docs - working-directory: contracts - - - name: Install website dependencies - run: | - npm install - working-directory: website - - - name: Fix typedoc and solidity docgen links - run: | - npm run setup-typedoc - npm run setup-soliditydocs - working-directory: website - - - name: Build 🔧 - run: | - npm run build - working-directory: website + ./.github/scripts/website.sh - name: Add CNAME run: |