fix(action): добавление настройки on-broken-links

This commit is contained in:
2026-06-13 21:38:07 +03:00
parent b80943dd5a
commit 6563b181dc
2 changed files with 7 additions and 1 deletions
+5
View File
@@ -5,6 +5,9 @@ inputs:
docs-path: docs-path:
description: 'Path to docs directory in calling repo' description: 'Path to docs directory in calling repo'
default: 'docs' default: 'docs'
on-broken-links:
description: 'Behavior on broken links: throw, warn, or ignore'
default: 'throw'
runs: runs:
using: 'composite' using: 'composite'
@@ -56,6 +59,8 @@ runs:
- name: Build docs - name: Build docs
shell: bash shell: bash
working-directory: ${{ github.action_path }}/docusaurus working-directory: ${{ github.action_path }}/docusaurus
env:
DOCUSERVIX_ON_BROKEN_LINKS: ${{ inputs.on-broken-links }}
run: yarn docusaurus build --out-dir ${{ github.workspace }}/generated-docs run: yarn docusaurus build --out-dir ${{ github.workspace }}/generated-docs
- name: Upload to S3 - name: Upload to S3
+2 -1
View File
@@ -30,6 +30,7 @@ const {
} = docsConfig.dirs || {} } = docsConfig.dirs || {}
const giteaUrl = 'https://git.jt4d.ru'; const giteaUrl = 'https://git.jt4d.ru';
const onBrokenLinks = (process.env.DOCUSERVIX_ON_BROKEN_LINKS as Config['onBrokenLinks']) || 'throw';
const config: Config = { const config: Config = {
title, title,
@@ -56,7 +57,7 @@ const config: Config = {
organizationName: org, organizationName: org,
projectName: repo, projectName: repo,
onBrokenLinks: 'throw', onBrokenLinks,
// Even if you don't use internationalization, you can use this field to set // Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you // useful metadata like html lang. For example, if your site is Chinese, you