Add automatic static files generation and publishing using AppVeyor

This commit is contained in:
Kévin Chalet 2017-09-25 09:09:58 +02:00
parent 18462898ea
commit 37d0f2a99c
2 changed files with 31 additions and 0 deletions

30
appveyor.yml Normal file
View File

@ -0,0 +1,30 @@
environment:
op_build_user: "OpenIddict Bot"
op_build_user_email: "32257313+openiddict-bot@users.noreply.github.com"
access_token:
secure: YusB3g3MzZkV+HZr30L99yz+LgFJkN9cJrxHhvZpjThKGFJMZHO2TpXxWsdgi+7L
build_script:
- ps: |
nuget install docfx.console -Version 2.24.0
docfx.console.2.24.0\tools\docfx docfx.json
if ($lastexitcode -ne 0)
{
throw [System.Exception] "docfx build failed with exit code $lastexitcode."
}
after_build:
- ps: |
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
{
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:op_build_user_email
git config --global user.name $env:op_build_user
git clone https://github.com/openiddict/openiddict-documentation.git -b gh-pages origin_site -q
Copy-Item origin_site/.git _site -recurse
CD _site
git add -A 2>&1
git commit -m "Update the documentation pages" -q
git push origin gh-pages -q
}

View File

@ -7,6 +7,7 @@
"**/*.yml"
],
"exclude": [
"appveyor.yml",
"obj/**",
"_site/**"
]