Skip to content

Commit

Permalink
add CD for documentation on push to main
Browse files Browse the repository at this point in the history
  • Loading branch information
pileks committed Sep 19, 2023
1 parent 51f887d commit 8adb627
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 9 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/cd-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build and Deploy Documentation

on:
push:
branches:
main

jobs:
deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm

- name: Setup Node.js
uses: actions/setup-node@master
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: (yarn install --nonInteractive --frozen-lockfile --prefer-offline || yarn install --nonInteractive --frozen-lockfile --prefer-offline)

- name: Build
run: yarn build

- name: Generate reference
run: yarn build:reference

- name: Deploy documentation to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages-reference
folder: reference
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"build:bundles": "lerna run build --scope @polywrap/*-config-bundle-js",
"build:client": "lerna run build --scope @polywrap/core-client-js --scope @polywrap/client-js --scope @polywrap/client-config-builder-js",
"build:docs": "lerna run build:docs",
"build:reference": "npx typedoc",
"lint": "lerna run lint",
"lint:fix": "lerna run lint -- --fix",
"lint:ci": "yarn lint",
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3107,9 +3107,9 @@ camelcase@^6.2.0:
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==

caniuse-lite@^1.0.30001517:
version "1.0.30001535"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001535.tgz#908a5b7ef11172f51f0b88f3d850aef1c6a3cf7b"
integrity sha512-48jLyUkiWFfhm/afF7cQPqPjaUmSraEhK4j+FCTJpgnGGEZHqyLe3hmWH7lIooZdSzXL0ReMvHz0vKDoTBsrwg==
version "1.0.30001538"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001538.tgz#9dbc6b9af1ff06b5eb12350c2012b3af56744f3f"
integrity sha512-HWJnhnID+0YMtGlzcp3T9drmBJUVDchPJ08tpUGFLs9CYlwWPH2uLgpHn8fND5pCgXVtnGS3H4QR9XLMHVNkHw==

caseless@~0.12.0:
version "0.12.0"
Expand Down Expand Up @@ -7866,9 +7866,9 @@ spdx-expression-parse@^3.0.0:
spdx-license-ids "^3.0.0"

spdx-license-ids@^3.0.0:
version "3.0.13"
resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz#7189a474c46f8d47c7b0da4b987bb45e908bd2d5"
integrity sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==
version "3.0.14"
resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.14.tgz#d16b09577b7de461c8c3e69734c4b9b467ac791f"
integrity sha512-U0eS5wcpu/O2/QZk6PcAMOA8H3ZuvRe4mFHA3Q+LNl1SRDmfQ+mD3RoD6tItqnvqubJ32m/zV2Z/ikSmxccD1Q==

split-on-first@^1.0.0:
version "1.1.0"
Expand Down Expand Up @@ -8605,9 +8605,9 @@ vscode-languageserver-textdocument@^1.0.3:
integrity sha512-1bonkGqQs5/fxGT5UchTgjGVnfysL0O8v1AYMBjqTbWQTFn721zaPGDYFkOKtfDgFiSgXM3KwaG3FMGfW4Ed9Q==

vscode-languageserver-types@^3.16.0:
version "3.17.3"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.3.tgz#72d05e47b73be93acb84d6e311b5786390f13f64"
integrity sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA==
version "3.17.4"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.4.tgz#0b422ecbc305f364f6579ba9e32b1d7ddb7ca789"
integrity sha512-9YXi5pA3XF2V+NUQg6g+lulNS0ncRCKASYdK3Cs7kiH9sVFXWq27prjkC/B8M/xJLRPPRSPCHVMuBTgRNFh2sQ==

vscode-nls@^5.0.0:
version "5.2.0"
Expand Down

0 comments on commit 8adb627

Please sign in to comment.