forked from SkyAudit/blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
38 lines (31 loc) · 988 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
28
29
30
31
32
33
34
35
36
37
38
language: go
go:
- '1.11.x'
install:
- mkdir $HOME/src
- cd $HOME/src
- git clone https://github.com/gohugoio/hugo.git
- cd hugo
- go install
- cd $TRAVIS_BUILD_DIR
- sudo pip install Pygments
- sudo pip install s3cmd
before_script:
- hugo version
- pygmentize -V
- python --version
- s3cmd --version
script:
- export CSS_VERSION=$(date +%s)
- mv themes/skycoin/static/css/main.css themes/skycoin/static/css/main-$CSS_VERSION.css
- hugo --buildFuture --config config.toml --destination public -v
after_success:
- ls public/
deploy:
skip_cleanup: true
provider: script
script: s3cmd --access_key="${AWS_ACCESS_KEY_ID}" --secret_key="${AWS_SECRET_ACCESS_KEY}" --region=ap-southeast-1 sync --delete-removed --acl-public --guess-mime-type --no-mime-magic --recursive public/ s3://www.skycoin.net/blog/
on:
branch: master
after_deploy:
- s3cmd --access_key="${AWS_ACCESS_KEY_ID}" --secret_key="${AWS_SECRET_ACCESS_KEY}" --region=ap-southeast-1 ls s3://www.skycoin.net/blog/