diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index d79b3d43..f0ba5538 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -29,10 +29,3 @@ jobs: run: npm run build - name: Test run: npm run test - - name: Build documentation - run: npm run doc - - name: Deploy documentation - uses: JamesIves/github-pages-deploy-action@4.1.1 - with: - branch: gh-pages # The branch the action should deploy to. - folder: docs # The folder the action should deploy. diff --git a/.github/workflows/release-npm.yml b/.github/workflows/release-npm.yml index f29b0326..6307d5fb 100644 --- a/.github/workflows/release-npm.yml +++ b/.github/workflows/release-npm.yml @@ -2,8 +2,8 @@ name: NPM Release on: release: - types: [ published ] - + types: + - created jobs: build: timeout-minutes: 5 @@ -30,7 +30,16 @@ jobs: run: npm run build - name: Test run: npm run test - - name: Publish + # Build and deploy documentation + - name: Build documentation + run: npm run doc + - name: Deploy documentation + uses: JamesIves/github-pages-deploy-action@4.1.1 + with: + branch: gh-pages # The branch the action should deploy to. + folder: docs # The folder the action should deploy. + # Release new NPM Version + - name: Publish repository run: npm publish dist --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS }}