summaryrefslogblamecommitdiff
path: root/.travis.yml
blob: 6e3dcc5a0a1a15b8dc231667d351553e3b4d6187 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                               



          








                                                                                      




                                    
                                     

                                     
                                                                                                                                                                                                                            









                                                                              
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