Merge pull request #2112 from shimat/feature/ocl-device-info #441
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: DocFX | |
| on: | |
| pull_request: | |
| paths: | |
| - "docs/**" | |
| - "src/OpenCvSharp/**" | |
| - ".github/workflows/docfx.yml" | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| concurrency: | |
| group: "docfx-${{ github.ref }}" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 1 | |
| - name: Install .NET | |
| uses: actions/setup-dotnet@v6 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Clean build outputs | |
| shell: pwsh | |
| run: | | |
| Get-ChildItem -Path . -Include bin,obj -Recurse -Directory | Remove-Item -Recurse -Force | |
| - name: Install DocFX | |
| shell: pwsh | |
| run: dotnet tool install -g docfx | |
| - name: Build Documentation | |
| shell: pwsh | |
| run: docfx docs/docfx/docfx.json | |
| - name: Upload GitHub Pages artifact | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: docs/docfx/_site | |
| deploy: | |
| if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' | |
| needs: build | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |