From f0ecf297d707882af9fe393599f69d225f69e4ee Mon Sep 17 00:00:00 2001 From: AppVeyor Doc Generation Date: Thu, 25 Aug 2016 20:40:52 +0200 Subject: [PATCH] Updated docs.cmd - Works? --- SpotifyAPI.Docs/.gitignore | 1 + SpotifyAPI.Docs/docs.cmd | 20 ++++++++++++++++++-- SpotifyAPI.Docs/mkdocs.yml | 2 +- SpotifyAPI.Docs/push-ghpages.sh | 22 ---------------------- 4 files changed, 20 insertions(+), 25 deletions(-) delete mode 100644 SpotifyAPI.Docs/push-ghpages.sh diff --git a/SpotifyAPI.Docs/.gitignore b/SpotifyAPI.Docs/.gitignore index 45ddf0ae..ea0e430a 100644 --- a/SpotifyAPI.Docs/.gitignore +++ b/SpotifyAPI.Docs/.gitignore @@ -1 +1,2 @@ site/ +deploy/ \ No newline at end of file diff --git a/SpotifyAPI.Docs/docs.cmd b/SpotifyAPI.Docs/docs.cmd index 6fb99562..eb2b5f60 100644 --- a/SpotifyAPI.Docs/docs.cmd +++ b/SpotifyAPI.Docs/docs.cmd @@ -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 ) diff --git a/SpotifyAPI.Docs/mkdocs.yml b/SpotifyAPI.Docs/mkdocs.yml index 8e84470f..e2dd394e 100644 --- a/SpotifyAPI.Docs/mkdocs.yml +++ b/SpotifyAPI.Docs/mkdocs.yml @@ -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 diff --git a/SpotifyAPI.Docs/push-ghpages.sh b/SpotifyAPI.Docs/push-ghpages.sh deleted file mode 100644 index f86f889a..00000000 --- a/SpotifyAPI.Docs/push-ghpages.sh +++ /dev/null @@ -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