File tree Expand file tree Collapse file tree 2 files changed +40
-1
lines changed Expand file tree Collapse file tree 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]
55env :
66 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
77 NUGET_API_KEY : ${{ secrets.NUGET_API_KEY }}
8+ DOCS_PATH : ${{ secrets.DOCS_PATH }}
9+ DOCS_BRANCH : ${{ secrets.DOCS_BRANCH }}
810
911jobs :
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+
1047 linux :
1148 runs-on : ubuntu-latest
1249
2461
2562 - name : Build
2663 run : |
27- if ($env:GITHUB_REF -eq "refs/heads/master ") {
64+ if ($env:GITHUB_REF -eq "refs/heads/main ") {
2865 .\build.ps1 -Target Publish
2966 } elseif ($env:GITHUB_REF -eq "refs/heads/devel") {
3067 .\build.ps1 -Target PrePublish
Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ artifacts/
7575[Tt ]ools /
7676! [Tt ]ools /packages.config
7777TestResults /
78+ node_modules
79+ package-lock.json
7880* .nuget.targets
7981* .nuget.props
8082* .nupkg
You can’t perform that action at this time.
0 commit comments