Another check for branches

This commit is contained in:
AppVeyor Doc Generation 2016-08-25 21:50:54 +02:00
parent 70282859a4
commit 01a9069422

View File

@ -1,25 +1,27 @@
if "%APPVEYOR_PULL_REQUEST_NUMBER%" == "" ( if "%APPVEYOR_PULL_REQUEST_NUMBER%" == "" (
echo Building docs... if "%APPVEYOR_REPO_BRANCH%" == "master" (
pip install mkdocs echo Building docs...
pip install mkdocs
cd ./SpotifyAPI.Docs cd ./SpotifyAPI.Docs
mkdocs build --clean mkdocs build --clean
mkdir deploy mkdir deploy
cd deploy cd deploy
git config --global user.email "johnny@johnnycrazy.de" git config --global user.email "johnny@johnnycrazy.de"
git config --global user.name "AppVeyor Doc Generation" git config --global user.name "AppVeyor Doc Generation"
git clone --quiet --branch=gh-pages https://%GH_TOKEN%@github.com/JohnnyCrazy/SpotifyAPI-NET gh-pages git clone --quiet --branch=gh-pages https://%GH_TOKEN%@github.com/JohnnyCrazy/SpotifyAPI-NET gh-pages
cd gh-pages cd gh-pages
git rm -qrf . git rm -qrf .
xcopy ..\..\site .\ /s /e /y xcopy ..\..\site .\ /s /e /y
git add -A git add -A
git commit -m "Built docs | AppVeyor Build %APPVEYOR_BUILD_NUMBER%" git commit -m "Built docs | AppVeyor Build %APPVEYOR_BUILD_NUMBER%"
git push -fq origin gh-pages git push -fq origin gh-pages
cd ../../../ cd ../../../
)
) else ( ) else (
echo Skipping doc build echo Skipping doc build
) )