Skip to content

Commit 1844805

Browse files
committed
merge public main into private main
2 parents ed1b043 + 63e69d3 commit 1844805

File tree

11,086 files changed

+952800
-175396
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

11,086 files changed

+952800
-175396
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
/docs/en/integrations/ @ClickHouse/integrations
1+
* @ClickHouse/docs
2+
/docs/integrations/ @ClickHouse/integrations @ClickHouse/docs
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Translation Issue Report
2+
description: File a report for translated documentation.
3+
title: "[translation issue]: "
4+
labels: ["translation issue"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Please report any problems found with translations of the documentation
10+
using this form.
11+
- type: dropdown
12+
id: language
13+
attributes:
14+
label: Language
15+
description: For which language are you reporting a translation issue?
16+
options:
17+
- Русский (Russian)
18+
- 中文 (Mandarin)
19+
- 日本語 (Japanese)
20+
default: 0
21+
validations:
22+
required: true
23+
- type: input
24+
id: url
25+
attributes:
26+
label: URL to page
27+
description: Please provide the URL of the page in question.
28+
placeholder: eg. https://clickhouse.com/docs/ru/architecture/replication
29+
validations:
30+
required: true
31+
- type: textarea
32+
id: problem
33+
attributes:
34+
label: What is the problem?
35+
description: Please tell us what the problem is
36+
placeholder: Tell us what you see!
37+
value: "The translation issue on this page is..."
38+
validations:
39+
required: true

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ updates:
66
schedule:
77
interval: "monthly"
88
- package-ecosystem: "npm"
9-
directory: "/docs/en/integrations"
9+
directory: "/docs/integrations"
1010
schedule:
1111
interval: "monthly"
1212
# Disable version updates for dependencies in the code snippets
1313
open-pull-requests-limit: 0
1414
- package-ecosystem: "pip"
15-
directory: "/docs/en/integrations"
15+
directory: "/docs/integrations"
1616
schedule:
1717
interval: "monthly"
1818
# Disable version updates for dependencies in the code snippets

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
## Checklist
55
- [ ] Delete items not relevant to your PR
66
- [ ] URL changes should add a redirect to the old URL via https://github.com/ClickHouse/clickhouse-docs/blob/main/docusaurus.config.js
7-
- [ ] If adding a new integration page, also add an entry to the integrations list here: https://github.com/ClickHouse/clickhouse-docs/blob/main/docs/en/integrations/index.mdx
7+
- [ ] If adding a new integration page, also add an entry to the integrations list here: https://github.com/ClickHouse/clickhouse-docs/blob/main/docs/integrations/index.mdx

.github/workflows/badges-notify.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Weekly Badge Monitor
2+
3+
on:
4+
schedule:
5+
# Run every Monday at 10:00 AM Amsterdam time (UTC+1/+2)
6+
# Using 8:00 UTC to account for Amsterdam time (adjusts for DST)
7+
- cron: '0 8 * * 1'
8+
workflow_dispatch: # Allow manual triggering
9+
10+
jobs:
11+
monitor-badges:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Make script executable
19+
run: chmod +x scripts/badger.sh
20+
21+
- name: Run badge finder script
22+
id: find_badges
23+
run: |
24+
# Run the script and capture output
25+
SCRIPT_OUTPUT=$(scripts/badger.sh)
26+
27+
# Escape the output for JSON and store in GitHub output
28+
# Replace newlines with \n and escape quotes
29+
ESCAPED_OUTPUT=$(echo "$SCRIPT_OUTPUT" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | sed ':a;N;$!ba;s/\n/\\n/g')
30+
31+
echo "badges_output<<EOF" >> $GITHUB_OUTPUT
32+
echo "$ESCAPED_OUTPUT" >> $GITHUB_OUTPUT
33+
echo "EOF" >> $GITHUB_OUTPUT
34+
35+
- name: Send webhook
36+
env:
37+
WEBHOOK_URL: ${{ secrets.DOCS_BADGER }}
38+
BADGES_OUTPUT: ${{ steps.find_badges.outputs.badges_output }}
39+
run: |
40+
# Create JSON payload
41+
JSON_PAYLOAD=$(cat <<EOF
42+
{
43+
"badges_list": "$BADGES_OUTPUT"
44+
}
45+
EOF
46+
)
47+
48+
# Send webhook
49+
curl -X POST \
50+
-H "Content-Type: application/json" \
51+
-d "$JSON_PAYLOAD" \
52+
"$WEBHOOK_URL"
53+
54+
- name: Log completion
55+
run: |
56+
echo "Badge monitoring completed successfully"
57+
echo "Webhook sent to configured endpoint"

.github/workflows/build-search.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,23 @@ env:
1515

1616
jobs:
1717
update-search:
18-
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'update search') && github.event.pull_request.base.ref == 'main'
19-
#if: contains(github.event.pull_request.labels.*.name, 'update search') # Updated to trigger directly on PRs with the label
18+
if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'update search') && github.event.pull_request.base.ref == 'main')
2019
runs-on: ubuntu-latest
2120

2221
steps:
2322
- name: Checkout Repository
24-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2524

2625
- name: Set up Node.js
27-
uses: actions/setup-node@v3
26+
uses: actions/setup-node@v4
2827
with:
2928
node-version: '20'
3029

3130
- name: Run Prep from Master
32-
run: yarn copy-clickhouse-repo-docs
31+
run: yarn copy-clickhouse-repo-docs -f
3332

3433
- name: Run Auto Generate Settings
35-
run: yarn auto-generate-settings
34+
run: yarn autogenerate-settings
3635

3736
- name: Run Indexer
3837
run: yarn run-indexer

.github/workflows/check-build.yml

Lines changed: 51 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -14,47 +14,64 @@ on:
1414
jobs:
1515
stylecheck:
1616
runs-on: ubuntu-latest
17-
17+
strategy:
18+
matrix:
19+
check_type: [spellcheck, kbcheck, md-lint]
1820
steps:
19-
# Step 1: Check out the repository
20-
- name: Check out repository
21-
uses: actions/checkout@v3
22-
23-
# Step 2: Set up environment if required (e.g., installing Aspell)
21+
# Add setup steps per check here
22+
- uses: actions/checkout@v4
2423
- name: Install Aspell
24+
if: matrix.check_type == 'spellcheck'
2525
run: sudo apt-get update && sudo apt-get install -y aspell aspell-en
26-
27-
# Step 3: Run the spellcheck script
28-
- name: Run spellcheck
29-
run: |
30-
./scripts/check-doc-aspell
31-
continue-on-error: true
32-
id: spellcheck
33-
34-
# Step 4: Setup Python and dependencies for KB checker
3526
- name: Set up Python
36-
uses: actions/setup-python@v3
37-
with:
38-
python-version: '3.x'
39-
40-
# Step 5: Install Python dependencies
41-
- name: Install dependencies
42-
run: |
43-
python -m pip install --upgrade pip
44-
pip install -r 'scripts/knowledgebase-checker/requirements.txt'
45-
46-
# Step 5: Run knowledgebase article checker
47-
- name: Check KB
27+
if: matrix.check_type == 'kbcheck'
4828
run: |
49-
./scripts/knowledgebase-checker/knowledgebase_article_checker.py --kb-dir="knowledgebase"
50-
continue-on-error: true
51-
id: kbcheck
29+
curl -Ls https://astral.sh/uv/install.sh | sh
30+
uv python install 3.12
31+
- name: Setup md-lint environment
32+
if: matrix.check_type == 'md-lint'
33+
uses: actions/setup-node@v3
34+
with:
35+
node-version: 20
36+
- name: Install markdownlint-cli2
37+
if: matrix.check_type == 'md-lint'
38+
run: yarn add -D markdownlint-cli2
5239

53-
# Step 6: Fail the build if any script returns exit code 1
54-
- name: Check exit code
40+
# Run the checks here
41+
- name: Run checks
42+
id: check_step
5543
run: |
56-
if [[ "${{ steps.spellcheck.outcome }}" == "failure" ]] || [[ "${{ steps.kbcheck.outcome }}" == "failure" ]]; then
57-
echo "Style check failed. See the logs for details."
44+
if [[ "${{ matrix.check_type }}" == "spellcheck" ]]; then
45+
yarn check-spelling
46+
exit_code=$?
47+
elif [[ "${{ matrix.check_type }}" == "kbcheck" ]]; then
48+
yarn check-kb
49+
exit_code=$?
50+
elif [[ "${{ matrix.check_type }}" == "md-lint" ]]; then
51+
yarn check-markdown
52+
exit_code=$?
53+
fi
54+
55+
if [[ $exit_code -ne 0 ]]; then
56+
echo "::error::${{ matrix.check_type }} check failed. See logs for details."
5857
exit 1
5958
fi
59+
60+
- name: Set check status
61+
if: steps.check_step.outcome != 'success'
62+
uses: actions/github-script@v6
63+
with:
64+
script: |
65+
core.setFailed('${{ matrix.check_type }} check failed.');
66+
67+
check_overall_status:
68+
needs: stylecheck
69+
runs-on: ubuntu-latest
70+
if: always() # run the job even if stylecheck fails
71+
steps:
72+
- name: Check overall results
73+
if: needs.stylecheck.result != 'success'
74+
run: |
75+
echo "::error::One or more checks of the style check failed."
76+
exit 1
6077

.github/workflows/linkcheck.yml

Lines changed: 0 additions & 77 deletions
This file was deleted.

.github/workflows/pull-request.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: PullRequestCI
2+
3+
env:
4+
# Force the stdout and stderr streams to be unbuffered
5+
PYTHONUNBUFFERED: 1
6+
7+
on: # yamllint disable-line rule:truthy
8+
pull_request:
9+
types:
10+
- synchronize
11+
- reopened
12+
- opened
13+
14+
# Cancel the previous wf run in PRs.
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
DocsCheck:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v3
25+
26+
- name: Set up Node.js
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: '20' # Adjust Node.js version as needed
30+
cache: 'yarn' # Cache yarn dependencies
31+
32+
- name: Install dependencies
33+
run: yarn install --frozen-lockfile
34+
35+
- name: Build
36+
id: build
37+
continue-on-error: true
38+
run: |
39+
DOCUSAURUS_IGNORE_SSG_WARNINGS=true yarn build
40+
echo "exit_code=$?" >> $GITHUB_OUTPUT
41+
42+
- name: Check for validation failures
43+
if: success() || failure() # Run regardless of build success
44+
run: |
45+
FAILED=false
46+
47+
if [ -f ".frontmatter-validation-failed" ]; then
48+
echo "::error::Frontmatter validation failed"
49+
FAILED=true
50+
fi
51+
52+
if [ -f ".floating-pages-validation-failed" ]; then
53+
echo "::error::Floating pages validation failed"
54+
FAILED=true
55+
fi
56+
57+
# Check if build failed with non-validation error
58+
if [ "${{ steps.build.outputs.exit_code }}" != "0" ] && [ "$FAILED" != "true" ]; then
59+
echo "::error::Build failed with exit code ${{ steps.build.outputs.exit_code }}"
60+
exit 1
61+
fi
62+
63+
if [ "$FAILED" = true ]; then
64+
exit 1
65+
fi

0 commit comments

Comments
 (0)