1
1
version : ' {build}'
2
2
os : Visual Studio 2017
3
3
4
+ # REF: https://github.com/docascode/docfx-seed/blob/master/appveyor.yml
5
+ before_build :
6
+ - ps : |
7
+ if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
8
+ {
9
+ git checkout $env:APPVEYOR_REPO_BRANCH -q
10
+ choco install docfx -y
11
+ }
12
+
13
+ after_build :
14
+ - ps : |
15
+ CD ./docs
16
+ if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
17
+ {
18
+ & docfx docfx.json
19
+ if ($lastexitcode -ne 0){
20
+ throw [System.Exception] "docfx build failed with exit code $lastexitcode."
21
+ }
22
+
23
+ git config --global credential.helper store
24
+ Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:ACCESS_TOKEN):x-oauth-basic@github.com`n"
25
+ git config --global user.email "jaredcnance@gmail.com"
26
+ git config --global user.name "Jared Nance"
27
+ git clone https://github.com/json-api-dotnet/JsonApiDotNetCore.git -b gh-pages origin_site -q
28
+ Copy-Item origin_site/.git _site -recurse
29
+ CD _site
30
+ git add -A 2>&1
31
+ git commit -m "CI Updates" -q
32
+ git push origin gh-pages -q
33
+ }
34
+
4
35
environment :
5
36
POSTGRES_PORT : tcp://localhost:5432
6
37
POSTGRES_ENV_POSTGRES_USER : postgres
@@ -9,6 +40,8 @@ environment:
9
40
PGUSER : postgres
10
41
PGPASSWORD : Password12!
11
42
Data:DefaultConnection : " Host=localhost;Port=5432;Database=JsonApiDotNetCoreExample;User ID=postgres;Password=Password12!"
43
+ ACCESS_TOKEN :
44
+ secure : g1T332Uarmdgtkftchpafa8tDP/7eM4O0BD6iu1wu+zR224IyH5R8pb4sTChr4Ia
12
45
13
46
pull_requests :
14
47
do_not_increment_build_number : true
@@ -40,6 +73,19 @@ artifacts:
40
73
- path : .\**\artifacts\**\*.nupkg
41
74
name : NuGet
42
75
76
+ on_success :
77
+ - git config --global credential.helper store
78
+ - ps : Add-Content "$HOME\.git-credentials" "https://$($env:ACCESS_TOKEN):x-oauth-basic@github.com`n"
79
+ - git config --global user.email "jaredcnance@gmail.com"
80
+ - git config --global user.name "Jared Nance"
81
+ - cd _site
82
+ - git init
83
+ - git remote add origin https://github.com/jaredcnance/test.git
84
+ - git add -A
85
+ - git commit -m "deploy"
86
+ - git checkout -b gh-pages
87
+ - git push -u origin gh-pages
88
+
43
89
deploy :
44
90
- provider : NuGet
45
91
server : https://www.myget.org/F/research-institute/api/v2/package
0 commit comments