Skip to content

Update .NET SDK doc with management API examples #246

Update .NET SDK doc with management API examples

Update .NET SDK doc with management API examples #246

Workflow file for this run

name: Validate Links
on:
pull_request:
# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
validate-links:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20.10.0"
- name: Install dependencies
run: npm install
- name: Build docs
run: npm run build
- name: Run link validation script
id: validate
run: |
set -o pipefail
node ./scripts/validate-links.js 2>&1 | tee validate-links.log
- name: Annotate PR on error
if: failure()
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const log = fs.readFileSync('validate-links.log', 'utf8');
github.rest.issues.createComment({
...context.repo,
issue_number: context.issue.number,
body: `## ❌ Link Validation Failed\n\`\`\`\n${log}\n\`\`\``
});
- name: Fail the job if broken links are found
if: failure()
run: exit 1