Skip to content

Commit d268aaf

Browse files
committed
fix travis
1 parent 3e38971 commit d268aaf

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: node_js
2+
node_js:
3+
- 9
4+
script:
5+
- npm run build
6+
after_script:
7+
- bash ./scripts/deploy-to-gh-pages.sh
8+
deploy:
9+
provider: pages
10+
skip-cleanup: true
11+
github-token: $GITHUB_TOKEN # Set in travis-ci.org dashboard, marked secure
12+
keep-history: true
13+
local-dir: build
14+
on:
15+
branch: master
16+

build/deploy_to_gh_pages.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
cd dist
2+
git init
3+
git config user.name "[email protected]"
4+
git config user.email "Travis"
5+
git add .
6+
git commit -m "Update docs"
7+
git push -f "https://${GITHUB_TOKEN}@github.com/vueComponent/vue-antd-issue-helper.git" master:gh-pages
8+
9+
echo "Done updating gh-pages\n"
10+
11+
else
12+
echo "Skipped updating gh-pages, because build is not triggered from the master branch."
13+
fi;

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
entry: './src/main.js',
1111
output: {
1212
path: path.resolve(__dirname, './dist'),
13-
publicPath: '/',
13+
publicPath: './',
1414
filename: 'build.[hash].js'
1515
},
1616
module: {

0 commit comments

Comments
 (0)