name: Docs build and deploy on: # run it on push to the default repository branch # push: # branches: [ master ] workflow_dispatch: inputs: publish_docs: description: 'Publish docs' type: boolean default: true env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 node_version: 24.x NUKE_TELEMETRY_OPTOUT: true jobs: build-and-test-code: name: Build and deploy docs to Netlify # use system defined below in the tests matrix runs-on: ${{ matrix.os }} strategy: # define the test matrix matrix: # selected operation systems to run CI os: [ ubuntu-latest ] steps: - uses: actions/checkout@v6 - name: Install Node.js uses: actions/setup-node@v6 with: node-version: ${{ env.node_version }} - name: Install .NET uses: actions/setup-dotnet@v5 with: dotnet-version: | 9.0.x 10.0.x - name: Build & Deploy docs preview run: | ./build.sh publish-docs-preview if: ${{ github.ref != 'refs/heads/master' && github.event.inputs.publish_docs == 'true' }} env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - name: Build & Deploy docs run: | ./build.sh publish-docs if: ${{ github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event.inputs.publish_docs == 'true') }} env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}