forked from swcarpentry/website-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (40 loc) · 1.29 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
47
48
49
dist: xenial
language: ruby
rvm:
- 2.5.3
cache: bundler
before_install:
- travis_apt_get_update
- sudo apt-get install -y python3.5 python3-pip
install:
- gem install yaml-lint
- python3 -m pip install --upgrade pip setuptools wheel
- python3 -m pip install --user PyGitHub
before_script:
- chmod +x ./bin/cibuild # or do this locally and commit
- chmod +x ./bin/update_feeds.sh
# Assume bundler is being used, therefore
# # the `install` step will run `bundle install` by default.
script:
- yaml-lint -q -n -i $(find _posts -regex ".*.md\|.*html" )
- yaml-lint -q -n -i $(find pages -regex ".*.md\|.*html" )
- 'if [ "$TRAVIS_BRANCH" = "gh-pages" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./bin/update_feeds.sh; fi'
- ./bin/cibuild
# # branch whitelist, only for GitHub Pages
branches:
only:
- gh-pages # test the gh-pages branch
- /pages-(.*)/ # test every branch which starts with "pages-"
- /blog-(.*)/ # build blog posts
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
before_deploy:
- pip install --user awscli
- export PATH=$PATH:$HOME/.local/bin
deploy:
skip_cleanup: true
provider: script
script: aws s3 sync --quiet --delete --acl public-read _site/ s3://software-carpentry.org/
on:
branch: gh-pages