forked from docascode/docfx-seed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
41 lines (37 loc) · 1.51 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
environment:
op_build_user: "OpenPublishBuild"
op_build_user_email: "[email protected]"
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):[email protected]`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
}