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 run: npm install
- name: Test - name: Test
run: npm run test run: npm run test
- name: Build
run: npm run build
with:
GITHUB_API_TOKEN: ${{secrets.GITHUB_API_TOKEN}}
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:

View file

@ -8,8 +8,8 @@
"build": "webpack --mode=production --config webpack.prod.js", "build": "webpack --mode=production --config webpack.prod.js",
"test": "jest", "test": "jest",
"start": "webpack-dev-server --open --config webpack.dev.js", "start": "webpack-dev-server --open --config webpack.dev.js",
"predeploy": "npm run build", "cleanup": "rm -rf node_modules/gh-pages/.cache",
"deploy": "gh-pages -d dist" "deploy": "npm run cleanup && gh-pages -d dist"
}, },
"author": "", "author": "",
"license": "MIT", "license": "MIT",