File tree Expand file tree Collapse file tree 2 files changed +68
-4
lines changed Expand file tree Collapse file tree 2 files changed +68
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : docs-stable
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - docs-stable
7
+ workflow_dispatch :
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : windows-latest
12
+ steps :
13
+
14
+ - name : Checkout
15
+ uses : actions/checkout@v3
16
+ with :
17
+ ref : docs-stable
18
+
19
+ - name : Build BenchmarkDotNet
20
+ run : ./build.bat --target Build
21
+
22
+ - name : Download changelog
23
+ run : ./build.bat --target DocFX_Changelog_Download --LatestVersions true --StableVersions true
24
+ env :
25
+ GITHUB_PRODUCT : ChangelogBuilder
26
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
27
+
28
+ - name : Build documentation
29
+ run : ./build.bat --target DocFX_Build
30
+
31
+ - name : Upload Artifacts
32
+ uses : actions/upload-artifact@v1
33
+ with :
34
+ name : site
35
+ path : docs/_site
36
+
37
+ deploy :
38
+ concurrency : ci-${{ github.ref }}
39
+ needs : [build]
40
+ runs-on : ubuntu-latest
41
+ steps :
42
+
43
+ - name : Download Artifacts
44
+ uses : actions/download-artifact@v1
45
+ with :
46
+ name : site
47
+
48
+ - name : Deploy documentation
49
+
50
+ with :
51
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
52
+ BRANCH : gh-pages
53
+ FOLDER : site
54
+ GIT_CONFIG_NAME : Andrey Akinshin
55
+ GIT_CONFIG_EMAIL :
[email protected]
56
+ CLEAN : true
Original file line number Diff line number Diff line change
1
+ using System ;
1
2
using System . IO ;
2
3
using System . Linq ;
3
4
using System . Text ;
@@ -428,12 +429,19 @@ public override void Run(BuildContext context)
428
429
context . DocfxChangelogDownload (
429
430
DocumentationHelper . BdnAllVersions [ i ] ,
430
431
DocumentationHelper . BdnAllVersions [ i - 1 ] ) ;
432
+ } else if ( context . Argument ( "LatestVersions" , false ) )
433
+ {
434
+ for ( int i = DocumentationHelper . BdnAllVersions . Length - 2 ; i < DocumentationHelper . BdnAllVersions . Length ; i ++ )
435
+ context . DocfxChangelogDownload (
436
+ DocumentationHelper . BdnAllVersions [ i ] ,
437
+ DocumentationHelper . BdnAllVersions [ i - 1 ] ) ;
431
438
}
432
439
433
- context . DocfxChangelogDownload (
434
- DocumentationHelper . BdnNextVersion ,
435
- DocumentationHelper . BdnAllVersions . Last ( ) ,
436
- "HEAD" ) ;
440
+ if ( ! context . Argument ( "StableVersions" , false ) )
441
+ context . DocfxChangelogDownload (
442
+ DocumentationHelper . BdnNextVersion ,
443
+ DocumentationHelper . BdnAllVersions . Last ( ) ,
444
+ "HEAD" ) ;
437
445
}
438
446
}
439
447
You can’t perform that action at this time.
0 commit comments