forked from JCofman/javascript-getting-started
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
27 lines (27 loc) · 990 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
language: node_js
node_js:
- "10"
sudo: false
before_install:
- openssl aes-256-cbc -K $encrypted_50094fda4654_key -iv $encrypted_50094fda4654_iv
-in gcs-service-account.json.enc -out gcs-service-account.json
-d
install:
- yarn
- yarn global add @cognite/[email protected]
script:
- ./build.sh
- |
if [ "${TRAVIS_PULL_REQUEST}" != "false" ] ; then
GOOGLE_APPLICATION_CREDENTIALS=gcs-service-account.json preview upload apps "javascript-getting-started/pr-${TRAVIS_PULL_REQUEST}" && \
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST \
-d "{\"body\": \"This apps can now be previewed at the following URL: https://pr-${TRAVIS_PULL_REQUEST}.javascript-getting-started.preview.cogniteapp.com\"}" \
"https://api.github.com/repos/${TRAVIS_REPO_SLUG}/issues/${TRAVIS_PULL_REQUEST}/comments"
fi
deploy:
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: apps
on:
branch: master