mirror of
https://gitee.com/dcren/openiddict-documentation.git
synced 2026-01-02 12:27:12 +08:00
31 lines
1.2 KiB
YAML
31 lines
1.2 KiB
YAML
|
|
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
|
||
|
|
}
|