add cleanup step and env variable to build step

This commit is contained in:
sorrelbri 2020-05-25 23:49:21 -07:00
parent ed9fcbe57b
commit 50524cb57f
2 changed files with 6 additions and 2 deletions

View file

@ -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:

View file

@ -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",