Skip to content

ci: add docs website deploy job#112

Merged
ssnd merged 15 commits intomainfrom
0-docs-website-deploy
Sep 8, 2025
Merged

ci: add docs website deploy job#112
ssnd merged 15 commits intomainfrom
0-docs-website-deploy

Conversation

@ssnd
Copy link
Contributor

@ssnd ssnd commented Sep 3, 2025

Description

Github action that deploys the docs website when changes to the docs folder are made


  • I have read and followed all requirements in CONTRIBUTING.md;
  • I used LLM/AI assistance to make this pull request;

If you have used LLM/AI assistance please provide model name and full prompt:

Model: {{model-name}}
Prompt: {{prompt}}

Summary by CodeRabbit

  • Documentation

    • Improved Quickstart wording for clarity (“create a config file”).
    • Fixed several internal documentation links and anchors for more reliable navigation.
  • Chores

    • Added a docs deployment workflow: PRs that change docs now trigger a deploy workflow when merged, dispatching an event to update the external documentation site.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2025

PR Title Validation Failed
Please refer to CONTRIBUTING.md

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2025

PR Title Validation Failed
Please refer to CONTRIBUTING.md

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2025

PR Title Validation Failed
Please refer to CONTRIBUTING.md

@coderabbitai
Copy link

coderabbitai bot commented Sep 3, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Adds a new GitHub Actions workflow .github/workflows/docs.yml that triggers on pull_request to main for changes under docs/**, checks out the PR merge commit, and dispatches a repository event to ozontech/seq-db-docs. Also small documentation edits: one wording change and three internal link/path fixes.

Changes

Cohort / File(s) Summary
CI workflow
.github/workflows/docs.yml
New "Deploy docs" workflow triggered on pull_request to main for docs/**; single job trigger_docs_website_deploy runs on ubuntu-latest only when the PR is merged, checks out the PR merge commit with actions/checkout@v5 (ref: ${{ github.event.pull_request.merge_commit_sha }}), then POSTs a repository_dispatch to ozontech/seq-db-docs using secrets.DOCS_REPO_TOKEN and event_type: "dispatch-event".
Docs wording
docs/en/01-quickstart.md
Minor wording change: "create config file" → "create a config file".
Markdown link fixes
docs/en/05-seq-ql.md
Removed anchor from two links: 03-index-types.md#keyword03-index-types.md.
Relative path normalization
docs/en/13-architecture.md
Removed leading ./ from ./internal/fractions.mdinternal/fractions.md.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

ci/cd, github-actions

Suggested reviewers

  • forshev
  • moflotas
  • eguguchkin

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 065fd71 and bbe9e14.

📒 Files selected for processing (1)
  • .github/workflows/docs.yml (1 hunks)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 0-docs-website-deploy

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2025

PR Title Validation Failed
Please refer to CONTRIBUTING.md

@codecov-commenter
Copy link

codecov-commenter commented Sep 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.85%. Comparing base (443c477) to head (bbe9e14).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #112      +/-   ##
==========================================
+ Coverage   71.67%   71.85%   +0.18%     
==========================================
  Files         200      200              
  Lines       18078    18078              
==========================================
+ Hits        12957    12990      +33     
+ Misses       4404     4368      -36     
- Partials      717      720       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2025

PR Title Validation Failed
Please refer to CONTRIBUTING.md

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (4)
.github/workflows/docs.yml (4)

1-1: Fix formatting of workflow name.

There are two spaces after the colon; YAMLlint flagged it.

-name:  Deploy docs
+name: Deploy docs

7-10: Add concurrency to avoid overlapping deploys.

Prevents multiple doc deploys racing on fast pushes.

 jobs:
-  do_stuff:
+  deploy:
     runs-on: ubuntu-latest
+    concurrency:
+      group: docs-${{ github.ref }}
+      cancel-in-progress: true

17-23: Fix the commented curl snippet (secrets, stray characters, header).

  • Use ${{ secrets.DOCS_REPO_TOKEN }} via env; $secrets.* won’t work.
  • Remove stray shell prompt artifacts on Line 17.
  • Prefer a clear event_type and optional payload.
-#          curl -L \                                                                                                                                                                                      ✔  13:58:31
+#          curl -sS -L \
-#            -H "Authorization: Bearer $secrets.DOCS_REPO_TOKEN" \
+#            -H "Authorization: Bearer $DOCS_REPO_TOKEN" \
-#            -d '{"event_type":"dispatch-event"}'
+#            -d '{"event_type":"deploy-docs"}'

1-23: Add a trailing newline.

YAMLlint flagged “no new line character at the end of file.”

 #            -d '{"event_type":"dispatch-event"}'
+ 
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 2facbea and bf0b668.

📒 Files selected for processing (2)
  • .github/workflows/docs.yml (1 hunks)
  • docs/en/01-quickstart.md (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/docs.yml

[warning] 1-1: too many spaces after colon

(colons)


[error] 23-23: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test
🔇 Additional comments (1)
docs/en/01-quickstart.md (1)

18-18: LGTM — grammar fix reads well.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2025

PR Title Validation Failed
Please refer to CONTRIBUTING.md

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2025

PR Title Validation Failed
Please refer to CONTRIBUTING.md

@ssnd ssnd closed this Sep 3, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2025

PR Title Validation Failed
Please refer to CONTRIBUTING.md

@ssnd ssnd reopened this Sep 3, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2025

PR Title Validation Failed
Please refer to CONTRIBUTING.md

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2025

PR Title Validation Failed
Please refer to CONTRIBUTING.md

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2025

PR Title Validation Failed
Please refer to CONTRIBUTING.md

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2025

PR Title Validation Failed
Please refer to CONTRIBUTING.md

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2025

PR Title Validation Failed
Please refer to CONTRIBUTING.md

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2025

PR Title Validation Failed
Please refer to CONTRIBUTING.md

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (2)
.github/workflows/docs.yml (2)

15-18: Drop merge_commit_sha checkout once using push.

Unnecessary for push; keep checkout simple and shallow.

-      - uses: actions/checkout@v4
-        with:
-          # Check out the merge commit on the base branch
-          ref: ${{ github.event.pull_request.merge_commit_sha }}
+      - uses: actions/checkout@v4
+        with:
+          fetch-depth: 1

3-9: Switch to push+paths; pull_request won’t have secrets from forks and won’t deploy post-merge.

Use push with a paths filter so deploy runs after merge to main and has secrets. Keep workflow_dispatch for manual runs.

-on:
-  pull_request:
-    branches: [ main ]
-    types: [ closed ]
-    paths:
-      - "docs/**"
+on:
+  push:
+    branches: [ main ]
+    paths:
+      - 'docs/**'
+  workflow_dispatch:
🧹 Nitpick comments (2)
.github/workflows/docs.yml (2)

10-13: Tighten permissions and add concurrency.

Least-privilege and avoiding overlapping deploys.

 jobs:
-  do_stuff:
+  deploy-docs:
     runs-on: ubuntu-latest
-    if: github.event.pull_request.merged == true
+    permissions:
+      contents: read
+    concurrency:
+      group: docs-${{ github.ref }}
+      cancel-in-progress: true

(Remove the merged check when moving to push.)


1-1: Fix YAML lint nits.

Single space after colon and ensure trailing newline.

-name:  Deploy docs
+name: Deploy docs
+ # (Also add a newline at EOF)

Also applies to: 27-27

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between bf0b668 and 2620a63.

📒 Files selected for processing (1)
  • .github/workflows/docs.yml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/docs.yml

[warning] 1-1: too many spaces after colon

(colons)


[error] 27-27: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test

@dkharms dkharms changed the title add docs website deploy job ci: add docs website deploy job Sep 3, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (3)
.github/workflows/docs.yml (3)

15-18: Remove PR-only ref when on push; keep only if you stay on pull_request.

-      - uses: actions/checkout@v5
-        with:
-          # Check out the merge commit on the base branch
-          ref: ${{ github.event.pull_request.merge_commit_sha }}
+      - uses: actions/checkout@v5

19-27: Harden the dispatch: fail fast, meaningful event type, include payload, don’t inline secrets.

-      - name: Send trigger for remote website deploy
-        run: |
-          curl -L  \
+      - name: Trigger docs build
+        env:
+          DOCS_REPO_TOKEN: ${{ secrets.DOCS_REPO_TOKEN }}
+        run: |
+          set -euo pipefail
+          curl -sS -L --fail-with-body \
             -X POST \
             -H "Accept: application/vnd.github+json" \
-            -H "Authorization: Bearer ${{ secrets.DOCS_REPO_TOKEN }}" \
+            -H "Authorization: Bearer ${DOCS_REPO_TOKEN}" \
             -H "X-GitHub-Api-Version: 2022-11-28" \
             https://api.github.com/repos/ozontech/seq-db-docs/dispatches \
-            -d '{"event_type":"dispatch-event"}'
+            -d '{"event_type":"deploy-docs","client_payload":{"repo":"${{ github.repository }}","ref":"${{ github.ref }}","sha":"${{ github.sha }}"}}'

Ensure ozontech/seq-db-docs has a workflow listening on:

on:
  repository_dispatch:
    types: [deploy-docs]

3-9: Switch to push + paths; PR-closed won’t have secrets from forks.

Use push to main with a docs/** paths filter so deploys happen post-merge with secrets available. Keep workflow_dispatch for manual runs.

Apply:

-on:
-  pull_request:
-    branches: [ main ]
-    types: [ closed ]
-    paths:
-      - "docs/**"
+on:
+  push:
+    branches: [ main ]
+    paths:
+      - 'docs/**'
+  workflow_dispatch:
-
-    if: github.event.pull_request.merged == true

Also applies to: 13-13

🧹 Nitpick comments (3)
.github/workflows/docs.yml (3)

10-13: Add concurrency and explicit permissions.

Prevents duplicate dispatches and locks down GITHUB_TOKEN scope.

 jobs:
   trigger_docs_website_deploy:
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
+    concurrency:
+      group: docs-deploy-${{ github.ref }}
+      cancel-in-progress: true

1-1: Fix YAML lint: extra spaces after colon in name.

-name:  Deploy docs
+name: Deploy docs

27-27: Add a trailing newline at EOF.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 101d955 and 065fd71.

📒 Files selected for processing (1)
  • .github/workflows/docs.yml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/docs.yml

[warning] 1-1: too many spaces after colon

(colons)


[error] 27-27: no new line character at the end of file

(new-line-at-end-of-file)

🔇 Additional comments (1)
.github/workflows/docs.yml (1)

3-9: No change needed: paths filter applies on pull_request “closed” events
Path filters are evaluated for all pull_request activity types (including closed) and, when combined with branch filters, both must match (docs.github.com)

@ssnd ssnd merged commit f18849b into main Sep 8, 2025
6 of 7 checks passed
@ssnd ssnd deleted the 0-docs-website-deploy branch September 8, 2025 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants