forked from pupil-labs/pupil-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
26 lines (25 loc) · 835 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
language: node_js
node_js:
- lts/*
branches:
only:
- master
before_install:
- openssl aes-256-cbc -K $encrypted_deaba444d90d_key -iv $encrypted_deaba444d90d_iv
-in docs_deploy_key.enc -out ./docs_deploy_key -d
install:
- yarn global add vuepress
- yarn
script:
- yarn build
- echo $TRAVIS_COMMIT > src/.vuepress/dist/gitcommit.txt
- du -ah src/.vuepress/dist
after_success:
- echo "Deploying to production"
- eval "$(ssh-agent -s)"
- chmod 600 ./docs_deploy_key
- echo -e "Host $SERVER_IP\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- ssh-add ./docs_deploy_key
- rsync -hrvz --delete --exclude '.htaccess' -e 'ssh -i ./docs_deploy_key -o "StrictHostKeyChecking no"' src/.vuepress/dist/ ${SERVER_USER}@${SERVER_IP}:~/domains/docs.pupil-labs.com/html/
- echo "Production deployed"
cache: yarn