Skip to content

Commit 01a9069

Browse files
author
AppVeyor Doc Generation
committed
Another check for branches
1 parent 7028285 commit 01a9069

1 file changed

Lines changed: 18 additions & 16 deletions

File tree

‎SpotifyAPI.Docs/docs.cmd‎

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
if "%APPVEYOR_PULL_REQUEST_NUMBER%" == "" (
2-
echo Building docs...
3-
pip install mkdocs
2+
if "%APPVEYOR_REPO_BRANCH%" == "master" (
3+
echo Building docs...
4+
pip install mkdocs
45

5-
cd ./SpotifyAPI.Docs
6-
mkdocs build --clean
6+
cd ./SpotifyAPI.Docs
7+
mkdocs build --clean
78

8-
mkdir deploy
9-
cd deploy
9+
mkdir deploy
10+
cd deploy
1011

11-
git config --global user.email "johnny@johnnycrazy.de"
12-
git config --global user.name "AppVeyor Doc Generation"
12+
git config --global user.email "johnny@johnnycrazy.de"
13+
git config --global user.name "AppVeyor Doc Generation"
1314

14-
git clone --quiet --branch=gh-pages https://%GH_TOKEN%@github.com/JohnnyCrazy/SpotifyAPI-NET gh-pages
15-
cd gh-pages
16-
git rm -qrf .
17-
xcopy ..\..\site .\ /s /e /y
18-
git add -A
19-
git commit -m "Built docs | AppVeyor Build %APPVEYOR_BUILD_NUMBER%"
20-
git push -fq origin gh-pages
15+
git clone --quiet --branch=gh-pages https://%GH_TOKEN%@github.com/JohnnyCrazy/SpotifyAPI-NET gh-pages
16+
cd gh-pages
17+
git rm -qrf .
18+
xcopy ..\..\site .\ /s /e /y
19+
git add -A
20+
git commit -m "Built docs | AppVeyor Build %APPVEYOR_BUILD_NUMBER%"
21+
git push -fq origin gh-pages
2122

22-
cd ../../../
23+
cd ../../../
24+
)
2325
) else (
2426
echo Skipping doc build
2527
)

0 commit comments

Comments
 (0)