Skip to content

ci: add notify-nuxt-website workflow #31726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 8, 2025
Merged

ci: add notify-nuxt-website workflow #31726

merged 3 commits into from
Apr 8, 2025

Conversation

atinux
Copy link
Member

@atinux atinux commented Apr 7, 2025

The goal is to trigger a new deployment once the docs for v3 is updated.

@atinux atinux requested a review from danielroe as a code owner April 7, 2025 21:44
Copy link

stackblitz bot commented Apr 7, 2025

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

coderabbitai bot commented Apr 7, 2025

Walkthrough

This pull request introduces a new GitHub Actions workflow file named notify-nuxt-website.yml. The workflow is triggered on pushes to the 3.x branch that affect files within the docs directory. It includes a job called notify, which employs a matrix strategy to specify the repository nuxt/nuxt.com. The job runs on the latest version of Ubuntu and consists of a single step that triggers a deployment for the Nuxt website using the peter-evans/repository-dispatch action. This step sends a notification with a token from the repository secrets, targeting the specified repository and event type docs-updated, along with a client payload containing the URL of the pull request.


🪧 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 plan to trigger planning for file edits and PR creation.
  • @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.

Copy link

pkg-pr-new bot commented Apr 7, 2025

Open in StackBlitz

@nuxt/kit

npm i https://pkg.pr.new/@nuxt/kit@31726

nuxt

npm i https://pkg.pr.new/nuxt@31726

@nuxt/rspack-builder

npm i https://pkg.pr.new/@nuxt/rspack-builder@31726

@nuxt/schema

npm i https://pkg.pr.new/@nuxt/schema@31726

@nuxt/vite-builder

npm i https://pkg.pr.new/@nuxt/vite-builder@31726

@nuxt/webpack-builder

npm i https://pkg.pr.new/@nuxt/webpack-builder@31726

commit: 0ca61c7

Copy link

codspeed-hq bot commented Apr 7, 2025

CodSpeed Performance Report

Merging #31726 will not alter performance

Comparing chore/notify-website (0ca61c7) with main (2227354)

Summary

✅ 10 untouched benchmarks

@danielroe danielroe changed the title chore(ci): add notify-nuxt-website workflow ci: add notify-nuxt-website workflow Apr 8, 2025
Co-authored-by: Daniel Roe <daniel@roe.dev>
@atinux atinux requested a review from danielroe April 8, 2025 07:53
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

🧹 Nitpick comments (1)
.github/workflows/notify-nuxt-website.yml (1)

18-24: Deployment Trigger Step and Client Payload Verification

The deployment step is implemented using the pinned commit of the peter-evans/repository-dispatch action, which is a good practice for stability and security. However, one potential issue is with the client payload:

  • The payload references ${{ github.event.pull_request.html_url }}. Since this workflow is triggered by a push event (and not a pull request event), the pull_request field may be absent, leading to an empty or undefined URL in the payload.

Please verify that this expression reliably returns the intended information, or consider using an alternative context value (e.g. commit URL or another identifier) that is available in a push event.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2940bb7 and 0ca61c7.

📒 Files selected for processing (1)
  • .github/workflows/notify-nuxt-website.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (18)
  • GitHub Check: test-fixtures (windows-latest, built, vite, default, manifest-off, json, 18)
  • GitHub Check: test-fixtures (windows-latest, built, vite, async, manifest-off, json, 18)
  • GitHub Check: test-fixtures (windows-latest, built, rspack, default, manifest-on, json, 18)
  • GitHub Check: test-fixtures (ubuntu-latest, dev, vite, default, manifest-on, json, 18)
  • GitHub Check: test-fixtures (windows-latest, dev, vite, async, manifest-off, json, 18)
  • GitHub Check: test-fixtures (ubuntu-latest, built, vite, async, manifest-off, json, 18)
  • GitHub Check: test-fixtures (windows-latest, dev, vite, default, manifest-on, json, 18)
  • GitHub Check: test-fixtures (windows-latest, dev, vite, async, manifest-on, json, 18)
  • GitHub Check: test-fixtures (ubuntu-latest, dev, vite, default, manifest-off, json, 18)
  • GitHub Check: test-fixtures (ubuntu-latest, built, rspack, default, manifest-on, json, 18)
  • GitHub Check: test-fixtures (ubuntu-latest, built, webpack, default, manifest-on, json, 18)
  • GitHub Check: test-fixtures (ubuntu-latest, built, vite, async, manifest-on, json, 18)
  • GitHub Check: test-fixtures (ubuntu-latest, built, rspack, async, manifest-on, json, 18)
  • GitHub Check: test-fixtures (ubuntu-latest, dev, vite, async, manifest-on, json, 18)
  • GitHub Check: release-pr
  • GitHub Check: test-benchmark
  • GitHub Check: typecheck (ubuntu-latest, bundler)
  • GitHub Check: typecheck (windows-latest, bundler)
🔇 Additional comments (4)
.github/workflows/notify-nuxt-website.yml (4)

1-1: Workflow Name is Clear

The workflow name "notify-nuxt-website" clearly expresses its purpose and aligns with the PR objective of deploying the Nuxt website after documentation updates.


2-8: Workflow Trigger Configuration

The trigger is configured to listen for push events to the 3.x branch and only affect changes within the docs directory. This matches the PR objectives well. Please verify that this configuration covers all intended scenarios.


9-10: Minimal Permissions Setting

Explicitly setting permissions: {} is a good security practice as it minimizes granted rights. As the deployment trigger uses a custom token from the repository secrets (NUXT_WEBSITE_GITHUB_TOKEN), ensure that these minimal permissions are sufficient for the action to perform as expected.


11-17: Job and Matrix Strategy

The job named notify is well structured. The matrix strategy with a single entry (nuxt/nuxt.com) provides flexibility for future expansion if multiple repositories need to be targeted. Running the job on ubuntu-latest is appropriate for a standard deployment environment.

@danielroe danielroe merged commit 50448ca into main Apr 8, 2025
47 checks passed
@danielroe danielroe deleted the chore/notify-website branch April 8, 2025 14:34
@github-actions github-actions bot mentioned this pull request Apr 8, 2025
danielroe added a commit that referenced this pull request Apr 14, 2025
Co-authored-by: Daniel Roe <daniel@roe.dev>
@github-actions github-actions bot mentioned this pull request Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants