Skip to content

fix: adjustments in publish-portal-content.sh (PROVCON-4978) #463

fix: adjustments in publish-portal-content.sh (PROVCON-4978)

fix: adjustments in publish-portal-content.sh (PROVCON-4978) #463

name: Validate Portal Content
on:
pull_request:
branches: [ main ]
paths:
- 'docs/**'
permissions: read-all
env:
LOG_LEVEL: ${{ github.event.inputs.log_level }}
jobs:
spell-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '20'
- name: Validate manifests
run: |
. ./docs/scripts/utilities.sh
for product in ./docs/products/*; do
if [[ -d "$product" ]]; then
product_name=${product#./docs/products/}
manifest="./docs/products/$product_name/manifest.json"
if [[ -f "$manifest" ]]; then
# Further actions...
log_message $INFO "Validating manifest in product: $product_name"
log_message $DEBUG "Validating manifest: $manifest"
npx -y ajv-cli validate -s ./docs/schemas/manifest.schema.json -d "$manifest" --spec=draft2020
fi
fi
done