Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: PullRequestCI
env:
# Force the stdout and stderr streams to be unbuffered
PYTHONUNBUFFERED: 1
CI: false

on: # yamllint disable-line rule:truthy
pull_request:
Expand Down Expand Up @@ -34,4 +33,33 @@ jobs:
run: yarn install --frozen-lockfile

- name: Build
run: yarn build
id: build
continue-on-error: true
run: |
CI=false DOCUSAURUS_IGNORE_SSG_WARNINGS=true yarn build
echo "exit_code=$?" >> $GITHUB_OUTPUT

- name: Check for validation failures
if: success() || failure() # Run regardless of build success
run: |
FAILED=false

if [ -f ".frontmatter-validation-failed" ]; then
echo "::error::Frontmatter validation failed"
FAILED=true
fi

if [ -f ".floating-pages-validation-failed" ]; then
echo "::error::Floating pages validation failed"
FAILED=true
fi

# Check if build failed with non-validation error
if [ "${{ steps.build.outputs.exit_code }}" != "0" ] && [ "$FAILED" != "true" ]; then
echo "::error::Build failed with exit code ${{ steps.build.outputs.exit_code }}"
exit 1
fi

if [ "$FAILED" = true ]; then
exit 1
fi
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
sidebar_label: "AWS PrivateLink for ClickPipes"
description: "Establish a secure connection between ClickPipes and a data source using AWS PrivateLink."
sidebar_label: 'AWS PrivateLink for ClickPipes'
description: 'Establish a secure connection between ClickPipes and a data source using AWS PrivateLink.'
slug: /integrations/clickpipes/aws-privatelink
title: "AWS PrivateLink for ClickPipes"
title: 'AWS PrivateLink for ClickPipes'
---

import cp_service from '@site/static/images/integrations/data-ingestion/clickpipes/cp_service.png';
Expand Down
10 changes: 9 additions & 1 deletion plugins/checkFloatingPages.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,15 @@ async function checkFloatingPages(context, options = {}) {
if (options && options.failBuild) {
console.error('\x1b[31m%s\x1b[0m', `${floatingPages.length} floating pages found:`);
floatingPages.forEach(page => console.error(` - ${page}`));
throw new Error('Error: Found "floating" pages without sidebars. For further details see: https://github.com/ClickHouse/clickhouse-docs/blob/main/contribute/style-guide.md/');
console.error('Error: Found "floating" pages without sidebars. For further details see: https://github.com/ClickHouse/clickhouse-docs/blob/main/contribute/style-guide.md/');

// Create a signal file
fs.writeFileSync(
path.join(process.cwd(), 'floating-pages-validation-failed'),
'Floating pages validation failed'
);

process.exit(1);
} else {
console.log('Warning:', 'Found floating pages:');
floatingPages.forEach(page => console.log(` - ${page}`));
Expand Down
12 changes: 9 additions & 3 deletions plugins/frontmatter-validation/frontmatterValidatorPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ function frontmatterValidatorPlugin(context, options) {
resetIssues();
},

// Check for issues after the build
// Check for issues
async postBuild({ outDir }) {
const filesWithIssues = getFilesWithIssues();

if (filesWithIssues.length > 0) {
if (options && options.failBuild) {
console.error('\n🚨 Build failed: Frontmatter validation issues found');
Expand All @@ -45,7 +45,13 @@ function frontmatterValidatorPlugin(context, options) {
console.log('See frontmatter-validation-errors.log (when running locally)')

// Fail the build by throwing an error
throw new Error('🚨Frontmatter validation failed. For more details see https://github.com/ClickHouse/clickhouse-docs/blob/main/contribute/style-guide.md');
console.error('🚨Frontmatter validation failed. For more details see https://github.com/ClickHouse/clickhouse-docs/blob/main/contribute/style-guide.md');
// Create a signal file
fs.writeFileSync(
path.join(process.cwd(), '.frontmatter-validation-failed'),
'Frontmatter validation failed'
);
process.exit(1);
} else {
console.log(`⚠️ Warning: Found ${filesWithIssues.length} files containing problems with frontmatter`)
}
Expand Down