Skip to content
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

chore: add environment to github pages workflow #664

Merged
merged 1 commit into from
Feb 27, 2025
Merged

Conversation

jamiehenson
Copy link
Member

@jamiehenson jamiehenson commented Feb 26, 2025

Review env workflow has gone belly up, citing the need for an environment variable in the GH workflow. I've added that here, and also altered the environment permissions to allow deployment from any branch to this env, but to require an approval from a member of the web team.

Summary by CodeRabbit

  • Chores
    • Updated the deployment configuration to better define and track preview environments, ensuring that preview URLs are now easily accessible for review and verification.

Copy link
Contributor

coderabbitai bot commented Feb 26, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The changes update GitHub Actions workflows by adding an environment configuration to the deploy-storybook job. Both the release.yml and review.yml files now include an environment section with a specified name (github-pages) and a URL sourced from the deployment step output. No modifications were made to any public or exported entities.

Changes

File(s) Change Summary
.github/workflows/release.yml, .github/workflows/review.yml Added an environment section to the deploy-storybook job, assigning name: github-pages and setting url using steps.deployment.outputs.page_url

Sequence Diagram(s)

sequenceDiagram
    participant GH as GitHub Actions
    participant Job as deploy-storybook Job
    participant Step as Deployment Step
    participant Env as GitHub Pages Environment

    GH->>Job: Trigger workflow
    Job->>Step: Execute deployment
    Step-->>Job: Return page URL
    Job->>Env: Configure environment with page URL
Loading

Poem

I'm a rabbit with a leaping heart,
Hopping through workflows, a brand new start!
With "github-pages" set so neat and true,
A page URL emerges like morning dew.
In every hop of code, my whiskers twirl,
Celebrating change in this nerdy rabbit world!


🪧 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.

@jamiehenson jamiehenson added the review Deploy Storybook to ably.github.io/ably-ui label Feb 26, 2025
@jamiehenson jamiehenson added review Deploy Storybook to ably.github.io/ably-ui and removed review Deploy Storybook to ably.github.io/ably-ui labels Feb 26, 2025
@jamiehenson jamiehenson added review Deploy Storybook to ably.github.io/ably-ui and removed review Deploy Storybook to ably.github.io/ably-ui labels Feb 26, 2025
@jamiehenson jamiehenson added review Deploy Storybook to ably.github.io/ably-ui and removed review Deploy Storybook to ably.github.io/ably-ui labels Feb 26, 2025
@jamiehenson jamiehenson force-pushed the review-fixup branch 2 times, most recently from 7e3471b to d9f1d35 Compare February 26, 2025 16:04
@jamiehenson jamiehenson marked this pull request as ready for review February 26, 2025 16:05
@jamiehenson jamiehenson added review Deploy Storybook to ably.github.io/ably-ui and removed review Deploy Storybook to ably.github.io/ably-ui labels Feb 26, 2025
Copy link
Contributor

@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: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4fc0ee6 and d9f1d35.

📒 Files selected for processing (2)
  • .github/workflows/release.yml (1 hunks)
  • .github/workflows/review.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/review.yml

19-19: property "deployment" is not defined in object type {deploy: {conclusion: string; outcome: string; outputs: {page_url: string}}}

(expression)

.github/workflows/release.yml

38-38: property "deployment" is not defined in object type {deploy: {conclusion: string; outcome: string; outputs: {page_url: string}}}

(expression)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Run linters and tests
🔇 Additional comments (2)
.github/workflows/review.yml (1)

1-16: Approval: Workflow Structure and Permissions

The overall workflow structure and permission settings (e.g., contents, pages, id-token) are clear and consistent. This enhances the deployment process for review builds.

.github/workflows/release.yml (1)

1-35: Approval: Release Workflow Structure

The rest of the release workflow is well-structured and the added environment configuration is consistent with best practices for GitHub Actions. The inclusion of the environment section enhances the deployment tracking for GitHub Pages.

🧰 Tools
🪛 actionlint (1.7.4)

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

(action)

@jamiehenson jamiehenson requested a review from a team February 26, 2025 16:13
@jamiehenson jamiehenson removed the review Deploy Storybook to ably.github.io/ably-ui label Feb 26, 2025
@jamiehenson jamiehenson added the review Deploy Storybook to ably.github.io/ably-ui label Feb 26, 2025
@jamiehenson jamiehenson merged commit 816ad62 into main Feb 27, 2025
5 checks passed
@jamiehenson jamiehenson deleted the review-fixup branch February 27, 2025 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review Deploy Storybook to ably.github.io/ably-ui
Development

Successfully merging this pull request may close these issues.

3 participants