From e955ae9000a78eeb3f391938c9273ffca01f02bb Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 4 Sep 2016 13:29:11 +0200 Subject: travis: rebuild website for updated docs on push --- .travis.yml | 3 +++ TOOLS/travis-rebuild-website | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100755 TOOLS/travis-rebuild-website diff --git a/.travis.yml b/.travis.yml index 30cb73e091..2cd4acf28e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,8 @@ env: global: # Coverity token - secure: "H21mSRlMhk4BKS0xHZvCFGJxteCP0hRVUxTuNfM2Z9HBsyutuLEYMtViLO86VtM+Tqla3xXPzUdS4ozLwI72Ax/5ZUDXACROj73yW6QhFB5D6rLut12+FjqC7M33Qv2hl0xwgNBmR5dsm1ToP37+Wn+ecJQNvN8fkTXF+HVzOEw=" + # Travis token for mpv.io + - secure: "nlTVLJK6kRhtXvhKCoJ3YdFGHuKaq/eHowfPw25hqRWuBOZd+HjHY5KIYjV7SxuKFDpJE4GpNcvA3Q31nsqomxpkLYgrwjg6TSazN7ZP+x85ZgV1QGFebrPfGm2n5UR5CAPAwFoeF3pZheLi4bajVzwq1fWW+x3grS188P9OZso=" compiler: - clang - gcc @@ -42,6 +44,7 @@ script: - ./bootstrap.py - ./waf configure - ./waf build +after_script: TOOLS/travis-rebuild-website notifications: email: false diff --git a/TOOLS/travis-rebuild-website b/TOOLS/travis-rebuild-website new file mode 100755 index 0000000000..8d04fb506c --- /dev/null +++ b/TOOLS/travis-rebuild-website @@ -0,0 +1,24 @@ +#!/bin/sh + +if [ "x$LIBAV" != "xffmpeg-git" ] || [ "x$TRAVIS_OS_NAME" != "xlinux" ]; then + # trigger build only on one of the matrix nodes + exit; +fi + +if [ "x$TRAVIS_BRANCH" != "xmaster" ]; then + # only rebuild website with pushes to master + exit; +fi + +body='{ +"request": { + "branch":"master" +}}' + +curl -s -X POST \ +-H "Content-Type: application/json" \ +-H "Accept: application/json" \ +-H "Travis-API-Version: 3" \ +-H "Authorization: token $WEBSITE_TRAVIS_TOKEN" \ +-d "$body" \ +https://api.travis-ci.org/repo/mpv-player%2Fmpv.io/requests -- cgit v1.2.3