|
10 | 10 | - main
|
11 | 11 |
|
12 | 12 | jobs:
|
13 |
| - build_and_deploy_job: |
14 |
| - if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') |
15 |
| - runs-on: ubuntu-latest |
16 |
| - name: Build and Deploy Job |
| 13 | + build_job: |
| 14 | + runs-on: windows-latest |
| 15 | + name: Build Job |
17 | 16 | steps:
|
18 |
| - - uses: actions/checkout@v3 |
| 17 | + - name: checkout repository |
| 18 | + uses: actions/checkout@v3 |
19 | 19 | with:
|
20 | 20 | submodules: true
|
| 21 | + - name: Install DocFX |
| 22 | + run: dotnet tool update -g docfx |
| 23 | + env: |
| 24 | + CI: true |
| 25 | + - name: build Documentation |
| 26 | + id: build-documentation |
| 27 | + run: | |
| 28 | + docfx build --warningsAsErrors |
| 29 | + shell: powershell |
| 30 | + - name: Zip artifact for deployment |
| 31 | + run: Compress-Archive -Path _site/* -DestinationPath .\_site.zip |
| 32 | + - name: Publish results |
| 33 | + uses: actions/upload-artifact@v3 |
| 34 | + with: |
| 35 | + name: release |
| 36 | + path: _site.zip |
| 37 | + |
| 38 | + deploy_job: |
| 39 | + if: (github.event_name == 'push' && github.repository == 'SkylineCommunications/dataminer-docs-connectors') |
| 40 | + runs-on: ubuntu-latest |
| 41 | + name: Deploy Job |
| 42 | + steps: |
| 43 | + - uses: actions/download-artifact@v3 |
| 44 | + with: |
| 45 | + name: release |
| 46 | + path: . |
| 47 | + - name: Unzip artifact for deployment |
| 48 | + run: Expand-Archive -Path _site.zip -DestinationPath ./_site |
| 49 | + shell: pwsh |
21 | 50 | - name: Build And Deploy
|
22 | 51 | id: builddeploy
|
23 | 52 | uses: Azure/static-web-apps-deploy@v1
|
|
31 | 60 | api_location: "" # Api source code path - optional
|
32 | 61 | output_location: "" # Built app content directory - optional
|
33 | 62 | ###### End of Repository/Build Configurations ######
|
34 |
| - |
35 |
| - close_pull_request_job: |
36 |
| - if: github.event_name == 'pull_request' && github.event.action == 'closed' |
37 |
| - runs-on: ubuntu-latest |
38 |
| - name: Close Pull Request Job |
39 |
| - steps: |
40 |
| - - name: Close Pull Request |
41 |
| - id: closepullrequest |
42 |
| - uses: Azure/static-web-apps-deploy@v1 |
43 |
| - with: |
44 |
| - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_DUNE_071CBEE03 }} |
45 |
| - action: "close" |
|
0 commit comments