File tree 2 files changed +40
-1
lines changed
2 files changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,45 @@ on: [push, pull_request]
5
5
env :
6
6
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7
7
NUGET_API_KEY : ${{ secrets.NUGET_API_KEY }}
8
+ DOCS_PATH : ${{ secrets.DOCS_PATH }}
9
+ DOCS_BRANCH : ${{ secrets.DOCS_BRANCH }}
8
10
9
11
jobs :
12
+ can_document :
13
+ runs-on : ubuntu-latest
14
+ outputs :
15
+ value : ${{ steps.check_job.outputs.value }}
16
+ steps :
17
+ - name : Checks whether documentation can be built
18
+ id : check_job
19
+ run : |
20
+ echo "value: ${{ env.DOCS_PATH != null && github.ref == env.DOCS_BRANCH }}"
21
+ echo "::set-output name=value::${{ env.DOCS_PATH != null && github.ref == env.DOCS_BRANCH }}"
22
+
23
+ documentation :
24
+ needs : [can_document]
25
+ runs-on : ubuntu-latest
26
+ if : needs.can_document.outputs.value == 'true'
27
+
28
+ steps :
29
+ - uses : actions/checkout@v2
30
+
31
+ - name : Use Node.js
32
+ uses : actions/setup-node@v1
33
+ with :
34
+ node-version : " 14.x"
35
+ registry-url : ' https://registry.npmjs.org'
36
+
37
+ - name : Install Dependencies
38
+ run : |
39
+ cd $DOCS_PATH
40
+ npm install
41
+
42
+ - name : Deploy Doclet
43
+ run : |
44
+ cd $DOCS_PATH
45
+ npx pilet publish --fresh --url https://feed.piral.cloud/api/v1/pilet/anglesharp --api-key ${{ secrets.PIRAL_FEED_KEY }}
46
+
10
47
linux :
11
48
runs-on : ubuntu-latest
12
49
24
61
25
62
- name : Build
26
63
run : |
27
- if ($env:GITHUB_REF -eq "refs/heads/master ") {
64
+ if ($env:GITHUB_REF -eq "refs/heads/main ") {
28
65
.\build.ps1 -Target Publish
29
66
} elseif ($env:GITHUB_REF -eq "refs/heads/devel") {
30
67
.\build.ps1 -Target PrePublish
Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ artifacts/
75
75
[Tt ]ools /
76
76
! [Tt ]ools /packages.config
77
77
TestResults /
78
+ node_modules
79
+ package-lock.json
78
80
* .nuget.targets
79
81
* .nuget.props
80
82
* .nupkg
You can’t perform that action at this time.
0 commit comments