diff --git a/IPA.Loader/doc/.gitignore b/IPA.Loader/doc/.gitignore index 3653286c..271d66a8 100644 --- a/IPA.Loader/doc/.gitignore +++ b/IPA.Loader/doc/.gitignore @@ -2,4 +2,5 @@ /**/DROP/ /**/TEMP/ /**/packages/ -/**/bin/ \ No newline at end of file +/**/bin/ +/obj \ No newline at end of file diff --git a/IPA.Loader/doc/articles/intro.md b/IPA.Loader/doc/articles/intro.md index c0478ced..1333ed77 100644 --- a/IPA.Loader/doc/articles/intro.md +++ b/IPA.Loader/doc/articles/intro.md @@ -1 +1 @@ -# Add your introductions here! +TODO diff --git a/IPA.Loader/doc/articles/toc.yml b/IPA.Loader/doc/articles/toc.yml index ff89ef1f..4b5c4398 100644 --- a/IPA.Loader/doc/articles/toc.yml +++ b/IPA.Loader/doc/articles/toc.yml @@ -1,2 +1,2 @@ -- name: Introduction +- name: Getting Started href: intro.md diff --git a/appveyor.yml b/appveyor.yml index cca54f24..8ce0619d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,6 +6,12 @@ pull_requests: install: - git submodule update --init --recursive - nuget restore + - ps: | + if (-Not $env:APPVEYOR_PULL_REQUEST_TITLE) + { + git checkout $env:APPVEYOR_REPO_BRANCH -q + choco install docfx -y + } image: Visual Studio 2017 configuration: Release platform: x64 @@ -35,4 +41,25 @@ deploy: draft: true force_update: true on: - branch: master \ No newline at end of file + branch: master +after_deploy: + - ps: | + if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE -And $env:APPVEYOR_REPO_BRANCH -eq 'master') + { + cd IPA.Loader/doc + & docfx docfx.json + if ($lastexitcode -ne 0){ + throw [System.Exception] "docfx build failed with exit code $lastexitcode." + } + + git config --global credential.helper store + #Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" + git config --global user.email $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL + git config --global user.name $env:APPVEYOR_REPO_COMMIT_AUTHOR + git clone "https://github.com/$env:APPVEYOR_REPO_NAME.git" -b gh-pages origin_site -q + Copy-Item origin_site/.git _site -recurse + CD _site + git add -A 2>&1 + git commit -m "$env:APPVEYOR_REPO_COMMIT_MESSAGE -- Docs" -q + git push origin gh-pages -q + }