forked from IFS49F/poker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
46 lines (40 loc) · 1.28 KB
/
.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
38
39
40
41
42
43
44
45
46
dist: trusty
sudo: false
language: node_js
node_js:
- '10'
cache: yarn
env:
- REACT_APP_DOMAIN=ifs49f-poker.surge.sh REACT_APP_SOCKET_SERVER_URL=https://afternoon-gorge-59515.herokuapp.com/
- REACT_APP_DOMAIN=poker4.fun REACT_APP_SOCKET_SERVER_URL=https://api.poker4.fun/ REACT_APP_GA_ID=UA-104177068-1
before_script:
- openssl aes-256-cbc -K $encrypted_edffe1b3d92e_key -iv $encrypted_edffe1b3d92e_iv
-in deploy_key.enc -out ~/.ssh/deploy_key -d
- chmod 600 ~/.ssh/deploy_key
- eval "$(ssh-agent -s)"
- ssh-add ~/.ssh/deploy_key
- ssh-keyscan -p $SSH_PORT poker4.fun >> ~/.ssh/known_hosts
script:
- yarn test --coverage
- yarn build
# https://surge.sh/help/adding-a-200-page-for-client-side-routing
before_deploy:
- cp ./build/index.html ./build/200.html
deploy:
- provider: pages
local_dir: ./coverage/
github_token: $POKER_LCOV_REPORT_TOKEN
skip_cleanup: true
on:
branch: master
- provider: surge
project: ./build/
domain: ifs49f-poker.surge.sh
skip_cleanup: true
on:
condition: $REACT_APP_DOMAIN = ifs49f-poker.surge.sh
- provider: script
script: rsync -r --delete-after -e "ssh -p $SSH_PORT" --quiet ./build/. [email protected]:/websites/poker
skip_cleanup: true
on:
condition: $REACT_APP_DOMAIN = poker4.fun