Spotify.NET/SpotifyAPI.Docs/docs.cmd

29 lines
744 B
Batchfile
Raw Normal View History

2016-08-20 12:20:52 +01:00
if "%APPVEYOR_PULL_REQUEST_NUMBER%" == "" (
2016-08-25 20:50:54 +01:00
if "%APPVEYOR_REPO_BRANCH%" == "master" (
echo Building docs...
2019-08-16 23:40:04 +01:00
powershell Install-Product node $env:NODEJS_VERSION
2016-08-25 19:40:52 +01:00
2016-08-25 20:50:54 +01:00
cd ./SpotifyAPI.Docs
2019-08-16 23:40:04 +01:00
yarn
yarn run build
2016-08-25 19:40:52 +01:00
2016-08-25 20:50:54 +01:00
mkdir deploy
cd deploy
2016-08-25 19:40:52 +01:00
2016-08-25 20:50:54 +01:00
git config --global user.email "johnny@johnnycrazy.de"
git config --global user.name "AppVeyor Doc Generation"
2016-08-25 19:40:52 +01:00
2016-08-25 20:50:54 +01:00
git clone --quiet --branch=gh-pages https://%GH_TOKEN%@github.com/JohnnyCrazy/SpotifyAPI-NET gh-pages
cd gh-pages
git rm -qrf .
2019-08-16 23:40:04 +01:00
xcopy ..\..\docs\.vuepress\dist .\ /s /e /y
2016-08-25 20:50:54 +01:00
git add -A
git commit -m "Built docs | AppVeyor Build %APPVEYOR_BUILD_NUMBER%"
git push -fq origin gh-pages
2016-08-25 19:40:52 +01:00
2016-08-25 20:50:54 +01:00
cd ../../../
)
2016-08-20 12:20:52 +01:00
) else (
echo Skipping doc build
)