forked from mattermost/mattermost-developer-documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
36 lines (36 loc) · 1.32 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
dist: trusty
sudo: false
language: go
go: "1.11"
env:
- HUGO_VERSION="0.56.3"
before_install:
- mkdir bin
- export PATH=$PATH:$PWD/bin
- wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz -O /tmp/hugo.tar.gz
- tar -xvf /tmp/hugo.tar.gz hugo && mv hugo bin
script:
- make dist
deploy:
- provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: mattermost-developer-documentation
local_dir: dist/html
upload-dir: branches/$TRAVIS_BRANCH
acl: public_read
skip_cleanup: true
on:
all_branches: true
- provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: mattermost-developer-documentation
local_dir: dist/html
upload-dir: commits/$TRAVIS_COMMIT
acl: public_read
skip_cleanup: true
on:
all_branches: true
after_deploy:
- 'curl -H "Authorization: token $GITHUB_ACCESS_TOKEN" --data "{\"state\": \"success\", \"target_url\": \"http://mattermost-developer-documentation.s3-website-us-east-1.amazonaws.com/commits/$TRAVIS_COMMIT\", \"description\": \"Deployed to S3\", \"context\": \"continuous-integration/s3-deploy\"}" "https://api.github.com/repos/mattermost/mattermost-developer-documentation/statuses/$TRAVIS_COMMIT"'