diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..77c8bad05 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,26 @@ +name: Build and Publish Docs + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Install Dependencies + run: npm i --silent + + - name: Build Docs + run: npm run build-docs + + - name: Deploy Docs + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs diff --git a/package.json b/package.json index 95b8b3660..dc2c13800 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "scripts": { "build": "tsc --build", "docs": "typedoc", - "generate-docs": "rm -rf docs dist && npm run build --silent && npm run docs --silent", + "build-docs": "rm -rf docs dist && npm run build --silent && npm run docs --silent", "core/main": "test -d ./node_modules || npm i --force && ts-node packages/core/src/main.ts", "core/test": "npm run test --prefix=packages/core", "core/build": "npm run build --prefix=packages/core",