Updated docs.cmd - Works?

This commit is contained in:
AppVeyor Doc Generation 2016-08-25 20:40:52 +02:00
parent 25e126b0f1
commit f0ecf297d7
4 changed files with 20 additions and 25 deletions

View File

@ -1 +1,2 @@
site/
deploy/

View File

@ -1,9 +1,25 @@
if "%APPVEYOR_PULL_REQUEST_NUMBER%" == "" (
echo Building docs...
pip install mkdocs
cd ./SpotifyAPI.Docs
mkdocs build
cd ..
mkdocs build --clean
mkdir deploy
cd deploy
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
cd ../..
) else (
echo Skipping doc build
)

View File

@ -20,7 +20,7 @@ repo_url: 'https://github.com/JohnnyCrazy/SpotifyAPI-NET'
site_author: 'JohnnyCrazy'
site_description: 'API Docs for SpotifyAPI-NET'
extra_javascript:
- '//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js'
- 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js'
- 'highlight.js'
markdown_extensions:
- sane_lists

View File

@ -1,22 +0,0 @@
#!/bin/bash
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
echo Starting push to gh-pages...
mkdir deploy
cd deploy
git config --global user.email "johnny@johnnycrazy.de"
git config --global user.name "Travis-CI"
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/JohnnyCrazy/SpotifyAPI-NET gh-pages > /dev/null
cd gh-pages
git rm -rf ./ 2> /dev/null
cp -Rf ../../site/* ./
git add -f .
git commit -m "Built mkdocs | Travis Build $TRAVIS_BUILD_NUMBER"
git push -fq origin gh-pages > /dev/null
echo -e "Done"
fi