Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
42 lines (37 sloc) 1.51 KB
environment:
op_build_user: "OpenPublishBuild"
op_build_user_email: "vscopbld@microsoft.com"
access_token:
secure: t74btP1uJUIXa65tTiQGWAZvYmJSNjSruJV90exd++sAjrKpo7f6e4LGJJLGIKb3
image: Visual Studio 2017
before_build:
- ps: |
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
{
git checkout $env:APPVEYOR_REPO_BRANCH -q
choco install docfx -y
# choco install nuget.commandline -y
}
build_script:
- msbuild src/SampleClass1/SampleClass1.sln
after_build:
- ps: |
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
{
# & nuget install docfx.console -Version 2.18.4 -Source https://www.myget.org/F/docfx/api/v3/index.json
# & docfx.console.2.18.4\tools\docfx docfx.json
& 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:op_build_user_email
git config --global user.name $env:op_build_user
git clone https://github.com/docascode/docfx-seed.git -b gh-pages origin_site -q
Copy-Item origin_site/.git _site -recurse
CD _site
git add -A 2>&1
git commit -m "CI Updates" -q
git push origin gh-pages -q
}
You can’t perform that action at this time.