From 50524cb57fbe2aff379993bf2b1eae5f7e765480 Mon Sep 17 00:00:00 2001 From: sorrelbri Date: Mon, 25 May 2020 23:49:21 -0700 Subject: [PATCH] add cleanup step and env variable to build step --- .github/workflows/main.yml | 4 ++++ package.json | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 11d650f..4b4d641 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,6 +25,10 @@ jobs: run: npm install - name: Test run: npm run test + - name: Build + run: npm run build + with: + GITHUB_API_TOKEN: ${{secrets.GITHUB_API_TOKEN}} - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: diff --git a/package.json b/package.json index ec76d88..c206162 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "build": "webpack --mode=production --config webpack.prod.js", "test": "jest", "start": "webpack-dev-server --open --config webpack.dev.js", - "predeploy": "npm run build", - "deploy": "gh-pages -d dist" + "cleanup": "rm -rf node_modules/gh-pages/.cache", + "deploy": "npm run cleanup && gh-pages -d dist" }, "author": "", "license": "MIT",