Skip to content

fix(functional-testing): fix sft mcp doc (#625) #246

fix(functional-testing): fix sft mcp doc (#625)

fix(functional-testing): fix sft mcp doc (#625) #246

Workflow file for this run

name: Publish Portal Content
on:
push:
branches:
- main
paths:
- 'docs/**'
release:
types: [published]
workflow_dispatch:
inputs:
environment:
description: 'Deployment environment: Production or Staging'
required: false
default: 'Staging'
log_level:
description: 'Log level: 1=DEBUG, 2=INFO, 3=WARNING, 4=ERROR'
required: false
default: '2' # Set the default log level to INFO
permissions: read-all
env:
LOG_LEVEL: ${{ github.event.inputs.log_level || '2' }}
jobs:
spell-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '20'
- name: Run cspell
run: npx -y cspell --config ./.cspell.json "./docs/**/*.md"
validate-manifests:
runs-on: ubuntu-latest
needs: spell-check
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '20'
- name: Validate manifests
run: npx tsx docs/scripts/validate-manifests.ts
publish:
runs-on: ubuntu-latest
environment: ${{ github.event_name == 'release' && 'Production' || github.event.inputs.environment || 'Staging' }}
needs: [spell-check, validate-manifests]
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '20'
- name: Publish docs to Portal
run: npx tsx docs/scripts/publish-portal-content.ts
env:
SWAGGERHUB_PORTAL_SUBDOMAIN: ${{ vars.SWAGGERHUB_PORTAL_SUBDOMAIN }}
SWAGGERHUB_API_KEY: ${{ secrets.SWAGGERHUB_API_KEY }}