change deploy branch

This commit is contained in:
thuhole
2020-07-08 10:43:43 +08:00
parent d9a71be858
commit 8590431d4c
2 changed files with 5 additions and 5 deletions

View File

@@ -12,7 +12,7 @@ after_success:
- git remote add origin https://thuhole:${GH_TOKEN}@github.com/thuhole/webhole.git
- CI=false REACT_APP_BUILD_INFO=$(printf "Travis%s" "$(TZ=Asia/Shanghai date +"%y%m%d%H%M%S")") npm run build
#额这里用了个骚操作来修复Service Worker在Precache CDN内容的时候index.html返回content-type text/plain的问题
- sed -i 's/\/\/cdn.jsdelivr.net\/gh\/thuhole\/webhole@gh-pages\/index.html/.\/index.html/g' build/*-*
- sed -i 's/\/\/cdn.jsdelivr.net\/gh\/thuhole\/webhole@gh-pages\/service-worker.js/.\/service-worker.js/g' build/*-*
- sed -i 's/"\/\/cdn.jsdelivr.net\/gh\/thuhole\/webhole@gh-pages","\/service-worker.js"/".","\/service-worker.js"/' build/static/js/*.js
- sed -i 's/\/\/cdn.jsdelivr.net\/gh\/thuhole\/webhole@gh-pages-master\/index.html/.\/index.html/g' build/*-*
- sed -i 's/\/\/cdn.jsdelivr.net\/gh\/thuhole\/webhole@gh-pages-master\/service-worker.js/.\/service-worker.js/g' build/*-*
- sed -i 's/"\/\/cdn.jsdelivr.net\/gh\/thuhole\/webhole@gh-pages-master","\/service-worker.js"/".","\/service-worker.js"/' build/static/js/*.js
- npm run deploy

View File

@@ -23,10 +23,10 @@
"build": "react-scripts build",
"test": "echo 'skipped react-scripts test --env=jsdom'",
"predeploy": "",
"deploy": "gh-pages -d build -m $(TZ=Asia/Shanghai date +\"%y%m%d%H%M%S\")",
"deploy": "gh-pages -b gh-pages-master -d build -m $(TZ=Asia/Shanghai date +\"%y%m%d%H%M%S\")",
"eject": "react-scripts eject"
},
"homepage": "https://://cdn.jsdelivr.net/gh/thuhole/webhole@gh-pages",
"homepage": "https://://cdn.jsdelivr.net/gh/thuhole/webhole@gh-pages-master",
"browserslist": {
"production": [
">0.2%",