Skip to content

ci: add docs build workflow#135

Merged
hydroroll-bot merged 5 commits intoHydroRoll-Team:mainfrom
NtskwK:feat/docs-build-test
Apr 1, 2026
Merged

ci: add docs build workflow#135
hydroroll-bot merged 5 commits intoHydroRoll-Team:mainfrom
NtskwK:feat/docs-build-test

Conversation

@NtskwK
Copy link
Copy Markdown
Member

@NtskwK NtskwK commented Apr 1, 2026

Summary by Sourcery

CI:

  • Introduce a GitHub Actions workflow that installs dependencies and builds the docs package on pushes, pull requests, and manual triggers.

Copilot AI review requested due to automatic review settings April 1, 2026 01:44
@NtskwK NtskwK enabled auto-merge (squash) April 1, 2026 01:44
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 1, 2026

@NtskwK is attempting to deploy a commit to the retrofor Team on Vercel.

A member of the Team first needs to authorize it.

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Apr 1, 2026

Reviewer's Guide

Adds a GitHub Actions workflow that builds the docs package on relevant pushes, pull requests, and manual triggers using pnpm and Node 22.

Flow diagram for docs build job steps

flowchart TD
  A[Start Docs Build Check workflow] --> B{Event type}
  B -->|push to main/dev with changes in packages/docs| C[Run build job on ubuntu-latest]
  B -->|pull_request to main with changes in packages/docs| C
  B -->|workflow_dispatch| C

  C --> D[Checkout code using actions/checkout@v6]
  D --> E[Install pnpm using pnpm/action-setup@v4]
  E --> F[Install Node.js 22 using actions/setup-node@v4 with pnpm cache]
  F --> G[Run pnpm install]
  G --> H[Run pnpm build in packages/docs]
  H --> I[Docs build completes]
Loading

File-Level Changes

Change Details Files
Introduce a dedicated GitHub Actions workflow to build the documentation package on CI.
  • Trigger workflow on pushes to main and dev that touch the docs package, on pull requests to main affecting docs, and via manual workflow_dispatch
  • Run the job on ubuntu-latest with read-only contents permission
  • Check out the repository, set up pnpm, and configure Node.js 22 with pnpm caching based on pnpm-lock.yaml
  • Install dependencies with pnpm install at the repo root and run pnpm build inside packages/docs
.github/workflows/docs-build.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • Consider pinning the GitHub Actions (checkout, pnpm/action-setup, setup-node) to specific commit SHAs instead of major tags to improve supply-chain security and reproducibility.
  • Using pnpm install --frozen-lockfile (or the stricter equivalent for your setup) instead of plain pnpm install would help ensure the docs build uses the exact dependency set defined in the lockfile.
  • If the project standardizes on an LTS Node.js version, you may want to align the node-version here with that LTS rather than hard-coding 22 to avoid unexpected incompatibilities.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider pinning the GitHub Actions (checkout, pnpm/action-setup, setup-node) to specific commit SHAs instead of major tags to improve supply-chain security and reproducibility.
- Using `pnpm install --frozen-lockfile` (or the stricter equivalent for your setup) instead of plain `pnpm install` would help ensure the docs build uses the exact dependency set defined in the lockfile.
- If the project standardizes on an LTS Node.js version, you may want to align the `node-version` here with that LTS rather than hard-coding `22` to avoid unexpected incompatibilities.

## Individual Comments

### Comment 1
<location path=".github/workflows/docs-build.yml" line_range="36-37" />
<code_context>
+          cache: "pnpm"
+          cache-dependency-path: "pnpm-lock.yaml"
+
+      - name: Install Dependencies
+        run: pnpm install
+
+      - name: Build Docs
</code_context>
<issue_to_address>
**suggestion:** Use a lockfile-respecting install to ensure deterministic dependency resolution

Using plain `pnpm install` in CI can mutate the lockfile or resolve dependencies differently between runs. To keep builds deterministic and fail fast when `pnpm-lock.yaml` is out of sync, use a strict/lockfile-only install (e.g. `pnpm install --frozen-lockfile`).

```suggestion
      - name: Install Dependencies
        run: pnpm install --frozen-lockfile
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a GitHub Actions workflow to ensure the packages/docs site builds successfully in CI, helping catch docs build regressions early.

Changes:

  • Introduces a new Docs Build Check workflow triggered on docs-path changes for pushes and PRs.
  • Sets up Node.js + pnpm, installs workspace dependencies, and runs the docs build.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
drop-out-docs Ready Ready Preview, Comment Apr 1, 2026 0:28am

Copy link
Copy Markdown
Member

@hydroroll-bot hydroroll-bot left a comment

Choose a reason for hiding this comment

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

LGTM,工作流配置合理,使用了最新的 actions 版本,缓存和触发条件都设置得当

@hydroroll-bot hydroroll-bot merged commit 0f44b95 into HydroRoll-Team:main Apr 1, 2026
16 checks passed
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.

4 participants