Skip to content

feat: test web use with ghpage#73

Merged
wabicai merged 6 commits into
mainfrom
feat/use-ghpage
Jun 23, 2025
Merged

feat: test web use with ghpage#73
wabicai merged 6 commits into
mainfrom
feat/use-ghpage

Conversation

@wabicai
Copy link
Copy Markdown
Member

@wabicai wabicai commented Jun 23, 2025

Summary by CodeRabbit

  • Chores
    • Added a new automated workflow to test and deploy the web application to a test endpoint via GitHub Actions. This runs only under certain conditions and does not affect the existing release process.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 23, 2025

Walkthrough

A new test-web job was added to the GitHub Actions workflow. This job checks out code, sets up Node.js, installs dependencies, builds the project, and deploys to GitHub Pages. It runs only under specific conditions and does not change the existing release-web job.

Changes

File Summary
.github/workflows/release-web.yml Added test-web job: sets environment, builds, and deploys to GitHub Pages with conditional logic.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub Actions
    participant test-web Job
    participant GitHub Pages

    GitHub Actions->>test-web Job: Trigger workflow (if conditions met)
    test-web Job->>test-web Job: Set environment variables
    test-web Job->>test-web Job: Checkout code (with LFS)
    test-web Job->>test-web Job: Setup Node.js (v16.x)
    test-web Job->>test-web Job: Install dependencies (yarn)
    test-web Job->>test-web Job: Build project
    test-web Job->>GitHub Pages: Deploy build output (with CNAME)
Loading
✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in Comment
  • Commit Unit Tests in branch feat/use-ghpage

🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests 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 or 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.

Copy link
Copy Markdown

@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: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between a323428 and 1e4073e.

📒 Files selected for processing (1)
  • .github/workflows/release-web.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/release-web.yml

17-17: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


21-21: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🔇 Additional comments (3)
.github/workflows/release-web.yml (3)

7-14: Validate job trigger and conditions.
The if expression makes this job run on manual dispatch or only after a successful workflow_run. Confirm this matches your desired trigger scenarios.


28-33: Install step looks good.
You pass NODE_AUTH_TOKEN correctly for private npm packages. No changes needed here.


34-40: Build step is sound.
NODE_OPTIONS handles memory limits well and PUBLIC_URL is applied. LGTM.

Comment thread .github/workflows/release-web.yml
Comment thread .github/workflows/release-web.yml
Copy link
Copy Markdown

@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 (1)
.github/workflows/release-web.yml (1)

64-71: Pin the GitHub Pages action version
Lock OneKeyHQ/actions/gh-pages to a specific tag or commit SHA instead of main to prevent unexpected upstream changes.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 52d28e1 and 93582e1.

📒 Files selected for processing (1)
  • .github/workflows/release-web.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/release-web.yml

17-17: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


21-21: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: release-web
  • GitHub Check: test-web
🔇 Additional comments (3)
.github/workflows/release-web.yml (3)

7-14: Clarify job trigger condition
The if clause mixing null checks is hard to read. Confirm it covers manual dispatch and only runs after a successful workflow_run.


17-17: Skip: actions/checkout@v3 is up-to-date
Static analysis flagged this, but actions/checkout@v3 is the latest stable version.


21-21: Skip: actions/setup-node@v3 is current
No update needed—actions/setup-node@v3 is the recommended version.

Comment thread .github/workflows/release-web.yml
Copy link
Copy Markdown

@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: 2

♻️ Duplicate comments (2)
.github/workflows/release-web.yml (2)

28-33: Add dependency caching
Cache yarn modules between runs with actions/cache@v3 to speed up installs.
Example:

- name: Cache dependencies
  uses: actions/cache@v3
  with:
    path: |
      .yarn/cache
      node_modules
    key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
    restore-keys: |
      ${{ runner.os }}-yarn-

64-71: Pin GitHub Pages action version
Lock OneKeyHQ/actions/gh-pages to a specific tag or SHA instead of main to prevent unexpected breaks:

- uses: OneKeyHQ/actions/gh-pages@main
+ uses: OneKeyHQ/actions/gh-pages@v1.2.3
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 93582e1 and a361fc1.

📒 Files selected for processing (1)
  • .github/workflows/release-web.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/release-web.yml

17-17: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


21-21: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🔇 Additional comments (4)
.github/workflows/release-web.yml (4)

14-14: Verify the job conditional
Double-check the if expression to ensure the job only runs under your intended triggers.


16-27: Checkout and Node setup look good
These steps use current actions and follow best practices.


34-46: Build step is solid
Logging and build commands are clear and effective.


47-63: Verify Build Output step is clear
The script correctly checks for the build directory and fails if it’s missing.

Comment thread .github/workflows/release-web.yml
Comment thread .github/workflows/release-web.yml
Copy link
Copy Markdown

@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/release-web.yml (2)

65-65: Pin the GitHub Pages action version
Use a stable tag or SHA instead of main to avoid unexpected upstream changes.

- uses: OneKeyHQ/actions/gh-pages@main
+ uses: OneKeyHQ/actions/gh-pages@vX.Y.Z

28-33: Consider adding dependency caching
Cache node_modules or .yarn/cache before install to speed up CI.

       - name: Install Dependency
         env:
           NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
           yarn
+
+      - name: Cache dependencies
+        uses: actions/cache@v3
+        with:
+          path: |
+            .yarn/cache
+            node_modules
+          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+          restore-keys: |
+            ${{ runner.os }}-yarn-
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between a361fc1 and ab08cc6.

📒 Files selected for processing (1)
  • .github/workflows/release-web.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/release-web.yml

17-17: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


21-21: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🔇 Additional comments (4)
.github/workflows/release-web.yml (4)

7-14: Confirm job trigger and CI override
This job runs only on manual dispatch and after a successful workflow run. Make sure that matches your intended use cases. Also, setting CI: false may skip built-in CI checks in your build—please confirm it’s intentional.


16-27: Checkout and setup look good
Steps use the latest major versions and correctly scope @onekeyhq.


34-46: Build steps look solid
The increased memory and variable echos aid troubleshooting.


47-63: Good verification step
Checking for ./build guards against silent failures.

Comment thread .github/workflows/release-web.yml
@wabicai wabicai merged commit a9c706c into main Jun 23, 2025
12 checks passed
@wabicai wabicai deleted the feat/use-ghpage branch June 23, 2025 07:54
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.

2 participants