-
Notifications
You must be signed in to change notification settings - Fork 87
/
.travis.yml
45 lines (39 loc) · 1.21 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
sudo: false
dist: trusty
language: c
compiler: clang
addons:
apt:
packages:
- zlibc
env:
- UPDATE_DIR=../../../public UPDATE_HTTP=none
branches:
only:
- stable
## See https://github.com/travis-ci/travis-ci/issues/7459#issuecomment-287040521
## See https://github.com/travis-ci/travis-ci/issues/7459#issuecomment-601346831
before_install:
# Check commit matches expected commit (because of Travis bug)
- |
if [[ "$TRAVIS_COMMIT" != "$(git rev-parse HEAD)" ]]; then
echo "Commit $(git rev-parse HEAD) doesn't match expected commit $TRAVIS_COMMIT"
fi
script:
- mkdir public
- make updates
- make news
- cp -v world/map/news.txt public/
- cp -v world/map/news.html public/
- cp -v world/map/news.rss public/
- cp -v world/map/news.json public/
- echo '<title>static update server</title><a href="TMW.zip">TMW.zip</a><br><a href="TMW-music.zip">TMW-music.zip</a><br><a href="news.txt">news.txt</a><br><a href="resources.xml">resources.xml</a>' > public/index.html
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN # Set in travis-ci.org dashboard, marked secure
keep-history: false
local-dir: public
target-branch: gh-pages
on:
branch: stable