-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
36 lines (30 loc) · 1.03 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
git:
submodules: false
branches:
only:
- master
env:
global:
- PRODUCT=viewer
- ROOT_DIR=common
- SRC_DIR=common/public
- DEST_DIR=/var/www/products.groupdocs.cloud/html
before_install:
- openssl aes-256-cbc -K $encrypted_dfdcfd5172af_key -iv $encrypted_dfdcfd5172af_iv
-in deploy_key.enc -out ./deploy_key -d
- sed -i 's/[email protected]:/https:\/\/github.com\//' .gitmodules
- git submodule update --init --recursive
- git submodule foreach git pull origin master
- eval "$(ssh-agent -s)"
- chmod 600 ./deploy_key
- echo -e "Host $HOST\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- ssh-add ./deploy_key
install:
- curl -LO https://github.com/gohugoio/hugo/releases/download/v0.67.1/hugo_extended_0.67.1_Linux-64bit.deb
- sudo dpkg -i hugo_extended_0.67.1_Linux-64bit.deb
script:
- cp -r english $ROOT_DIR/content/
- hugo --source $ROOT_DIR --minify
after_success:
- scp -i ./deploy_key -r $SRC_DIR/$PRODUCT $USER@$HOST:$DEST_DIR
- scp -i ./deploy_key -r $SRC_DIR/sitemap.xml $USER@$HOST:$DEST_DIR/sitemaps/$PRODUCT.xml