From 1a404dd2bf02cf96f01ece10497766965986a2da Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Fri, 17 Mar 2023 15:34:33 -0500 Subject: [PATCH] chore: update website with action to automate docs --- .github/workflows/build-docs.yml | 39 ++++++++++++++++++++++++++++++++ docusaurus.config.js | 20 ++++++++-------- 2 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/build-docs.yml diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml new file mode 100644 index 000000000..cfb25a6df --- /dev/null +++ b/.github/workflows/build-docs.yml @@ -0,0 +1,39 @@ +name: build-docs + +on: + workflow_dispatch: + # Review gh actions docs if you want to further define triggers, paths, etc + # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on + +jobs: + deploy: + name: Checkout and Build Docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + repository: 'sern-handler/handler', + path: 'handler/' + - uses: actions/setup-node@v3 + with: + node-version: 18 + cache: npm + - uses: actions/checkout@v3 + - name: Install dependencies + run: npm ci + - name: clean docs directory + run: | + rm -rf docs + - name: Build website + run: npm run build + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v5-beta + with: + commit-message: "chore: update docs" + branch: docs + delete-branch: true + branch-suffix: short-commit-hash + title: "docs: Update docs" + body: "asfl;asdkcng;lfkv;lajf;bflglfsafs;af" + reviewers: jacoobes diff --git a/docusaurus.config.js b/docusaurus.config.js index 04a6a75e7..96cb05a75 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -159,16 +159,16 @@ const config = { darkTheme: darkCodeTheme, }, }), - // plugins : [ - // [ - // 'docusaurus-plugin-typedoc', - // { - // //if you're editing website, please change this to your local branch of sern to generate documentation - // entryPoints: ['../sernHandlerV2/src/index.ts'], - // tsconfig: '../sernHandlerV2/tsconfig-esm.json', - // }, - // ] - // ] + plugins : [ + [ + 'docusaurus-plugin-typedoc', + { + //if you're editing website, please change this to your local branch of sern to generate documentation + entryPoints: ['../handler/src/index.ts'], + tsconfig: '../handler/tsconfig-esm.json', + }, + ] + ] }; module.exports = config;