mirror of
https://gitee.com/dcren/openiddict-documentation.git
synced 2026-01-02 20:42:18 +08:00
Add automatic static files generation and publishing using AppVeyor
This commit is contained in:
30
appveyor.yml
Normal file
30
appveyor.yml
Normal 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
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
"**/*.yml"
|
"**/*.yml"
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
|
"appveyor.yml",
|
||||||
"obj/**",
|
"obj/**",
|
||||||
"_site/**"
|
"_site/**"
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user