From 01a906942248c5fa7c96f5b5b4cc722bbbadb61d Mon Sep 17 00:00:00 2001 From: AppVeyor Doc Generation Date: Thu, 25 Aug 2016 21:50:54 +0200 Subject: [PATCH] Another check for branches --- SpotifyAPI.Docs/docs.cmd | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/SpotifyAPI.Docs/docs.cmd b/SpotifyAPI.Docs/docs.cmd index 9359a8ca..d3716339 100644 --- a/SpotifyAPI.Docs/docs.cmd +++ b/SpotifyAPI.Docs/docs.cmd @@ -1,25 +1,27 @@ if "%APPVEYOR_PULL_REQUEST_NUMBER%" == "" ( - echo Building docs... - pip install mkdocs + if "%APPVEYOR_REPO_BRANCH%" == "master" ( + echo Building docs... + pip install mkdocs - cd ./SpotifyAPI.Docs - mkdocs build --clean + cd ./SpotifyAPI.Docs + mkdocs build --clean - mkdir deploy - cd deploy + mkdir deploy + cd deploy - git config --global user.email "johnny@johnnycrazy.de" - git config --global user.name "AppVeyor Doc Generation" + git config --global user.email "johnny@johnnycrazy.de" + git config --global user.name "AppVeyor Doc Generation" - git clone --quiet --branch=gh-pages https://%GH_TOKEN%@github.com/JohnnyCrazy/SpotifyAPI-NET gh-pages - cd gh-pages - git rm -qrf . - xcopy ..\..\site .\ /s /e /y - git add -A - git commit -m "Built docs | AppVeyor Build %APPVEYOR_BUILD_NUMBER%" - git push -fq origin gh-pages + git clone --quiet --branch=gh-pages https://%GH_TOKEN%@github.com/JohnnyCrazy/SpotifyAPI-NET gh-pages + cd gh-pages + git rm -qrf . + xcopy ..\..\site .\ /s /e /y + git add -A + git commit -m "Built docs | AppVeyor Build %APPVEYOR_BUILD_NUMBER%" + git push -fq origin gh-pages - cd ../../../ + cd ../../../ + ) ) else ( echo Skipping doc build )