From 9bb0c628b2fd13f83f74ac3e8a6406537db769d1 Mon Sep 17 00:00:00 2001 From: Josh Johnson Date: Thu, 24 Oct 2019 17:20:57 +0100 Subject: [PATCH] Add deploy to gh pages action (#690) --- .../workflows/{npmpublish.yml => publish.yml} | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) rename .github/workflows/{npmpublish.yml => publish.yml} (72%) diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/publish.yml similarity index 72% rename from .github/workflows/npmpublish.yml rename to .github/workflows/publish.yml index 03ce301..5367e2a 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/publish.yml @@ -62,4 +62,27 @@ jobs: HUSKY_SKIP_INSTALL: true - run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} \ No newline at end of file + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + + deploy-gh-pages: + needs: publish-npm + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + with: + fetch-depth: 1 + - uses: actions/setup-node@v1 + with: + node-version: 10 + registry-url: https://registry.npmjs.org/ + - name: Build + run: | + npm ci + npm run build + rm -rf public/test + - name: Deploy + uses: peaceiris/actions-gh-pages@v2.5.0 + env: + ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} + PUBLISH_BRANCH: gh-pages + PUBLISH_DIR: ./public \ No newline at end of file