File tree Expand file tree Collapse file tree 3 files changed +65
-1
lines changed Expand file tree Collapse file tree 3 files changed +65
-1
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ echo Deploy to GitHub Pages
4
+
5
+ # only deploy tags
6
+ if [ -z " $TRAVIS_TAG " ]; then
7
+
8
+ echo Deploy to GitHub Pages - Skip deployment
9
+
10
+ else
11
+
12
+ echo Deploy to GitHub Pages - Start
13
+
14
+ # go to the directory which contains build artifacts and create a *new* Git repo
15
+ # directory may be different based on your particular build process
16
+ cd dist/some-app
17
+ git init
18
+
19
+ # inside this git repo we'll pretend to be a new user
20
+ git config user.name " Travis CI"
21
+ git config user.email " tomas.trajan@gmail.com"
22
+
23
+ # The first and only commit to this new Git repo contains all the
24
+ # files present with the commit message "Deploy to GitHub Pages".
25
+ git add .
26
+ git commit -m " Deploy to GitHub Pages"
27
+
28
+ # Force push from the current repo's master branch to the remote
29
+ # repo's gh-pages branch. (All previous history on the gh-pages branch
30
+ # will be lost, since we are overwriting it.) We redirect any output to
31
+ # /dev/null to hide any sensitive credential data that might otherwise be exposed.
32
+ # tokens GH_TOKEN and GH_REF will be provided as Travis CI environment variables
33
+ git push --force --quiet " https://${GH_TOKEN} @${GH_REF} " master:gh-pages > /dev/null 2>&1
34
+
35
+ echo Deploy to GitHub Pages - Success
36
+
37
+ fi
38
+
39
+ echo Deploy to GitHub Pages - Finish
Original file line number Diff line number Diff line change
1
+ language : node_js
2
+ node_js :
3
+ - " 10"
4
+ sudo : required
5
+ dist : trusty
6
+ addons :
7
+ chrome : stable
8
+ cache :
9
+ directories :
10
+ - $HOME/.npm
11
+ before_install :
12
+ - export CHROME_BIN=chromium-browser
13
+ - export DISPLAY=:99.0
14
+ - sh -e /etc/init.d/xvfb start
15
+ install :
16
+ - npm install codecov -g
17
+ - npm ci
18
+ script :
19
+ # run build script specified in package.json
20
+ - npm run ci
21
+ # call script for deploying of produced artifacts
22
+ - bash ./.travis-deploy.sh
23
+ after_success :
24
+ - codecov
Original file line number Diff line number Diff line change 7
7
"build" : " ng build" ,
8
8
"test" : " ng test" ,
9
9
"lint" : " ng lint" ,
10
- "e2e" : " ng e2e"
10
+ "e2e" : " ng e2e" ,
11
+ "ci" : " ng build --project @my-org/some-lib && ng build --prod"
11
12
},
12
13
"private" : true ,
13
14
"dependencies" : {
You can’t perform that action at this time.
0 commit comments