forked from ganlvtech/down_52pojie_cn
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use new build script. Move script into a new dir.
- Loading branch information
Showing
4 changed files
with
44 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,5 @@ yarn-error.log* | |
|
||
/public/list.json | ||
/php/origin.json | ||
/dist.zip | ||
/dist.zip | ||
/gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,25 @@ | ||
matrix: | ||
include: | ||
- language: node_js | ||
node_js: | ||
- "node" | ||
branches: | ||
only: | ||
- master | ||
script: | ||
- chmod 777 ./build_release.sh | ||
- ./build_release.sh | ||
deploy: | ||
provider: releases | ||
api-key: $GITHUB_TOKEN | ||
file: ./dist.zip | ||
skip-cleanup: true | ||
on: | ||
tags: true | ||
|
||
- language: node_js | ||
node_js: | ||
- "node" | ||
branches: | ||
only: | ||
- master | ||
script: | ||
- chmod 777 ./build_github_pages.sh | ||
- ./build_github_pages.sh | ||
deploy: | ||
provider: pages | ||
local-dir: dist | ||
skip-cleanup: true | ||
github-token: $GITHUB_TOKEN | ||
keep-history: true | ||
on: | ||
branch: master | ||
language: node_js | ||
node_js: | ||
- "10" | ||
branches: | ||
only: | ||
- master | ||
script: | ||
- chmod 777 ./build/build_release.sh | ||
- ./build/build_release.sh | ||
- chmod 777 ./build/build_github_pages.sh | ||
- ./build/build_github_pages.sh | ||
deploy: | ||
- provider: releases | ||
api-key: $GITHUB_TOKEN | ||
file: ./dist.zip | ||
skip-cleanup: true | ||
on: | ||
tags: true | ||
- provider: pages | ||
local-dir: gh-pages | ||
skip-cleanup: true | ||
github-token: $GITHUB_TOKEN | ||
keep-history: true | ||
on: | ||
branch: master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
#!/usr/bin/env bash | ||
pushd $(dirname $0) | ||
cd .. | ||
|
||
export USE_FANCY_INDEX=true | ||
mkdir backup | ||
cp public/index.html backup/index.html | ||
sed -i "s/new Down52PojieCn({/& routerMode: 'history', requestType: 'jsonp' /g" public/index.html | ||
|
||
rm -rf dist/ | ||
|
||
npm install | ||
npm run build | ||
|
||
sed -i "s/new Down52PojieCn({/& routerMode: 'history', requestType: 'jsonp' /g" dist/.fancyindex/footer.html | ||
|
||
rm dist/index.html | ||
cp LICENSE dist/ | ||
cp php/ dist/ -R | ||
cp LICENSE dist/ | ||
cp README.md dist/ | ||
zip dist.zip -r dist | ||
rm -rf dist/ | ||
|
||
cp backup/index.html public/index.html | ||
rm -rf backup/ | ||
popd |