Skip to content

(build) fix CWD error and vercel deployment on production#75

Merged
spashii merged 1 commit intomainfrom
fix/prod-vercel-build
Mar 19, 2025
Merged

(build) fix CWD error and vercel deployment on production#75
spashii merged 1 commit intomainfrom
fix/prod-vercel-build

Conversation

@spashii
Copy link
Copy Markdown
Member

@spashii spashii commented Mar 19, 2025

Summary by CodeRabbit

  • Chores
    • Improved deployment workflows by separating tool setup from dependency installation for better control.
    • Streamlined production build and deployment commands, making the process clearer and more consistent.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 19, 2025

Walkthrough

This pull request updates several GitHub Actions workflows used for deploying the Vercel dashboard and portal. The changes disable the automatic dependency installation by setting run_install to false in the pnpm/action-setup steps. An explicit "Install Dependencies" step, running pnpm install --frozen-lockfile in the echo/frontend directory, is now added. For production workflows, build and deploy commands have been streamlined to use the shorthand --prod flag instead of --target=production. No modifications to exported or public entities were made.

Changes

File(s) Change Summary
.github/workflows/dev-deploy-vercel-dashboard.yml
.github/workflows/dev-deploy-vercel-portal.yml
Disabled automatic dependency installation (run_install: false) in pnpm/action-setup and added an explicit "Install Dependencies" step (pnpm install --frozen-lockfile in echo/frontend).
.github/workflows/prod-deploy-vercel-dashboard.yml
.github/workflows/prod-deploy-vercel-portal.yml
Applied the same pnpm changes and updated Vercel build/deploy commands from using --target=production to the shorthand --prod for clarity and brevity.

Sequence Diagram(s)

sequenceDiagram
    participant Runner as GitHub Actions Runner
    participant Setup as pnpm/action-setup
    participant Install as "Install Dependencies Step"
    
    Runner->>Setup: Execute setup (run_install: false)
    Runner->>Install: Run "pnpm install --frozen-lockfile" in echo/frontend
Loading
sequenceDiagram
    participant Runner as GitHub Actions Runner
    participant Setup as pnpm/action-setup
    participant Install as "Install Dependencies Step"
    participant Build as "Build Project Artifacts"
    participant Deploy as "Deploy Artifacts to Vercel"
    
    Runner->>Setup: Execute setup (run_install: false)
    Runner->>Install: Run "pnpm install --frozen-lockfile" in echo/frontend
    Runner->>Build: Execute "vercel build --prod"
    Runner->>Deploy: Execute "vercel deploy --prebuilt --prod"
Loading

Possibly related PRs

Poem

In our pipelines, change takes flight,
pnpm now pauses its auto-sight.
Dependencies installed with style and grace,
Vercel commands streamlined in pace.
Code refined like silicon dreams in flight—
LGTM, our work shines bright!

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

📜 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 cc65afb and 91f44fd.

📒 Files selected for processing (4)
  • .github/workflows/dev-deploy-vercel-dashboard.yml (1 hunks)
  • .github/workflows/dev-deploy-vercel-portal.yml (1 hunks)
  • .github/workflows/prod-deploy-vercel-dashboard.yml (2 hunks)
  • .github/workflows/prod-deploy-vercel-portal.yml (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: ci-build-servers (dbr-echo-server, ./echo/server, Dockerfile, dbr-echo-server)
  • GitHub Check: ci-build-servers (dbr-echo-directus, ./echo/directus, Dockerfile, dbr-echo-directus)
🔇 Additional comments (10)
.github/workflows/dev-deploy-vercel-portal.yml (2)

26-26: Disable Auto-Install in pnpm Action
Setting run_install: false here is a solid move. This ensures that dependency installation is deferred to an explicit step, effectively sidestepping any potential CWD issues. LGTM.


28-30: Explicit Dependency Installation Step
Adding the "Install Dependencies" step with pnpm install --frozen-lockfile in the echo/frontend directory clarifies the process and addresses the CWD error precisely. LGTM.

.github/workflows/dev-deploy-vercel-dashboard.yml (2)

26-26: Disable pnpm Auto-Installation
The update to run_install: false ensures that dependency management is explicitly handled later. This is a clear and deliberate improvement. LGTM.


28-30: Clarify Dependency Installation
The new "Install Dependencies" step directly invokes pnpm install --frozen-lockfile in echo/frontend, which minimizes any CWD ambiguity during deployment. LGTM.

.github/workflows/prod-deploy-vercel-portal.yml (3)

25-26: Disable Automatic Dependency Installation
By setting run_install: false, the workflow now mitigates unexpected CWD errors by managing dependencies explicitly. A top-notch adjustment for production deployment. LGTM.


27-29: Dedicated Dependency Installation Step
Introducing an explicit dependency installation step in the echo/frontend folder streamlines the setup process and prevents CWD errors. LGTM.


40-45: Streamlined Production Build & Deploy Commands
Switching to the shorthand --prod flag for both building and deploying the project not only simplifies the commands but also aligns them with modern best practices. LGTM.

🧰 Tools
🪛 YAMLlint (1.35.1)

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

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

.github/workflows/prod-deploy-vercel-dashboard.yml (3)

27-28: Properly Disable Auto-Install
The run_install: false parameter is correctly applied, ensuring dependency installation is managed in a controlled, explicit step. LGTM.


29-31: Explicit Dependency Installation
Adding the separate "Install Dependencies" step with the proper working directory (echo/frontend) directly addresses the CWD issues—solid and clean approach. LGTM.


42-47: Optimized Production Build & Deploy
The move from --target=production to --prod streamlines your commands while keeping the production deployment crisp and clear. LGTM.

🧰 Tools
🪛 YAMLlint (1.35.1)

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

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


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@spashii spashii merged commit d66c591 into main Mar 19, 2025
7 checks passed
@spashii spashii deleted the fix/prod-vercel-build branch March 19, 2025 12:53
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.

1 participant