From a8047524173ee0b52a858a4db6e8dfbdce16abc3 Mon Sep 17 00:00:00 2001 From: Sivan Date: Fri, 21 Feb 2020 16:34:22 +0800 Subject: [PATCH] chore: add npm publish --- .github/workflows/deploy.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 89f7dbb..ab26d46 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,8 +13,20 @@ jobs: uses: actions/checkout@v2 with: persist-credentials: false - - - name: Build and Deploy + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 10 + - name: NPM Install and Test + run: | + npm install + npm run test + npm run build + - name: Publish + uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} + - name: Deploy to gh-pages uses: JamesIves/github-pages-deploy-action@releases/v3 with: ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}