add cleanup step and env variable to build step
This commit is contained in:
parent
ed9fcbe57b
commit
50524cb57f
2 changed files with 6 additions and 2 deletions
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
|
@ -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:
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue