Skip to content

Commit 436b16e

Browse files
committed
Skip build from PR and non vue-version branches.
1 parent 77b3c37 commit 436b16e

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ node_js:
44

55
cache: npm
66

7+
# Set permissions
78
before_script:
89
- chmod +x ./scripts/build.sh
910

11+
# Run build script
1012
script: ./scripts/build.sh
1113

14+
# Deploy only from `vue-version` branch
1215
deploy:
1316
provider: pages
1417
skip_cleanup: true

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
> AMIA-CIAT demo output website (version 2.0) <br>
44
> A Vue.js project <br>
5-
> ###version 2.0.0
6-
> Static build files from the latest vue project at branch [vue-version](https://github.com/ciatph/ciatph.github.io/tree/vue-version)).
5+
> ### version 2.0.0
6+
> Static build files from the latest vue project at branch [vue-version](https://github.com/ciatph/ciatph.github.io/tree/vue-version)). <br>
77
Contains updated content with new AMIA Phase 2 information and documents.
88

99
<br>

scripts/build.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ set -ev
33

44
if [ "${GITHUB_API_TOKEN}" ]; then
55
npm run lint
6-
npm run build
7-
cp README.md dist/
8-
cd dist
9-
ls -l -a
6+
7+
# Build only from `vue-version` branch
8+
if [ "${TRAVIS_BRANCH}" = 'vue-version' -a "${TRAVIS_PULL_REQUEST}" = 'false' ]; then
9+
npm run build
10+
cp README.md dist/
11+
cd dist
12+
ls -l -a
13+
fi
1014
fi

0 commit comments

Comments
 (0)