forked from jp112sdl/AskSinAnalyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
37 lines (31 loc) · 906 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
language: node_js
node_js:
- '10'
branches:
except:
- gh-pages
before_script:
- export OWNER="$(echo $TRAVIS_REPO_SLUG | cut -d/ -f1)"
- export REPO="$(echo $TRAVIS_REPO_SLUG | cut -d/ -f2)"
- export VUE_APP_CDN_URL="https://$OWNER.github.io/$REPO/$TRAVIS_BRANCH"
- export VUE_APP_COMMIT_HASH=$(git log --pretty=format:'%h' -n 1)
script:
- cd ui
- npm ci
- npm run build
- echo $VUE_APP_COMMIT_HASH > dist/commit-hash.txt
- cd ..
- cp ota/version ui/dist/esp-version.txt
before_deploy:
- git clone --branch=gh-pages https://[email protected]/$TRAVIS_REPO_SLUG.git gh-pages
- cd gh-pages
- rm -rf $TRAVIS_BRANCH
- mv ../ui/dist $TRAVIS_BRANCH
- if [ -z "$(git status --porcelain)" ]; then travis_terminate 0 ; fi
- git add $TRAVIS_BRANCH
- git commit -m "Build $TRAVIS_BRANCH"
deploy:
provider: script
script: git push
on:
all_branches: true