From 1e69d86b0c474054cdf2a4d47e0f799d837dd2ef Mon Sep 17 00:00:00 2001 From: Harttle Date: Sat, 22 Jan 2022 21:59:02 +0800 Subject: [PATCH] chore: build docs on master push --- .github/workflows/docs.yml | 27 +++++++++++++++++++++++++++ .github/workflows/release.yml | 9 ++------- 2 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..4c77db842 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,27 @@ +name: Docs +on: + push: + branches: + - master +jobs: + docs: + name: Docs + runs-on: ubuntu-18.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' + - name: Build + run: | + npm ci + npm run build:docs + - name: Publish + uses: JamesIves/github-pages-deploy-action@4.1.4 + with: + branch: gh-pages + folder: docs/public \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5bd83cf9b..01913522d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: - name: Build run: | npm ci - npm run build + npm run build:dist - name: Test run: | npm run lint @@ -29,9 +29,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npx semantic-release - - name: Publish Docs - uses: JamesIves/github-pages-deploy-action@4.1.4 - with: - branch: gh-pages - folder: docs/public \ No newline at end of file + run: npx semantic-release \ No newline at end of file