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

Add solidity integration docs #3486

Merged
merged 2 commits into from
Jan 8, 2025
Merged

Add solidity integration docs #3486

merged 2 commits into from
Jan 8, 2025

Conversation

trajan0x
Copy link
Contributor

@trajan0x trajan0x commented Jan 8, 2025

Description

Solidity workflow docs

Summary by CodeRabbit

  • Documentation
    • Added comprehensive guide for configuring Vercel project deployment for Solidity documentation using GitHub Actions
    • Provided step-by-step instructions for project setup, repository import, and deployment configuration

Copy link
Contributor

coderabbitai bot commented Jan 8, 2025

Walkthrough

The changes involve updating the .github/workflows/solidity.md documentation with a comprehensive guide for configuring a new Vercel project for Solidity documentation deployment through GitHub Actions. The guide provides detailed, step-by-step instructions for repository import, project configuration, obtaining project IDs, setting root directories, and adding necessary secret variables to ensure smooth documentation deployment when pushing to the main branch.

Changes

File Change Summary
.github/workflows/solidity.md Added detailed instructions for Vercel project configuration and Solidity documentation deployment

Poem

🐰 A Rabbit's Deployment Delight

Vercel's magic, GitHub's might,
Solidity docs take their flight,
Configuration steps so clear,
Deployment's path now without fear,
Pushing code with pure delight! 🚀


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 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. (Beta)
  • @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.

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.

@github-actions github-actions bot added M-ci Module: CI size/xs labels Jan 8, 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: 3

🧹 Nitpick comments (3)
.github/workflows/solidity.md (3)

1-4: Enhance the introduction with automation benefits

Consider adding a brief explanation of the benefits of using GitHub Actions over the Vercel UI, such as automated deployments and consistent configuration across projects.

 # Configuring a New Vercel Project for Solidity Documentation

-Since we're using Vercel via github actions rather than the UI, configuring a new project requires a little extra work.
+Since we're using Vercel via GitHub Actions rather than the UI, configuring a new project requires a little extra work. This automation ensures consistent deployments across all Solidity documentation projects and eliminates the need for manual intervention after the initial setup.

14-15: Add validation steps for configuration

Consider adding a verification step to ensure the configuration was successful, such as checking the GitHub Actions secrets and testing the deployment workflow.

 6. [Add this variable as a secret to github actions](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository). As a convention this should be called `VERCEL_[PACKAGE_NAME]_DOCS_PROJECT_ID` (e.g. `VERCEL_CONTRACT_DOCS_PROJECT_ID` for contracts-core).
 7. Add the project id to the PROJECT_IDS mapping in [solidity.yml](./solidity.yml) under the "Get Project ID" step.
+8. Verify your configuration:
+   - Check that the secret is properly set in GitHub Actions settings
+   - Validate the PROJECT_IDS mapping in solidity.yml
+   - Create a test commit to verify the deployment workflow
🧰 Tools
🪛 LanguageTool

[typographical] ~14-~14: Consider adding a comma after this introductory phrase.
Context: ...reating-secrets-for-a-repository). As a convention this should be called `VERCEL_[PACKAGE_...

(AS_A_NN_COMMA)


17-17: Add information about additional deployment scenarios

Consider adding information about preview deployments for pull requests and manual workflow triggers.

-Now you're done. Any time you push to the main branch, the Solidity documentation will be deployed to vercel.
+Now you're done. The documentation will be:
+- Automatically deployed to production when pushing to the main branch
+- Available as preview deployments for pull requests
+- Manually deployable through the GitHub Actions workflow interface
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a100d0f and cf7bb02.

⛔ Files ignored due to path filters (1)
  • .github/workflows/assets/root-dir.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • .github/workflows/solidity.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
.github/workflows/solidity.md

[typographical] ~14-~14: Consider adding a comma after this introductory phrase.
Context: ...reating-secrets-for-a-repository). As a convention this should be called `VERCEL_[PACKAGE_...

(AS_A_NN_COMMA)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: SonarCloud

Comment on lines +15 to +16
7. Add the project id to the PROJECT_IDS mapping in [solidity.yml](./solidity.yml) under the "Get Project ID" step.

Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Add example of PROJECT_IDS mapping format

Include an example of the expected format in the solidity.yml file to make it clearer for users.

 7. Add the project id to the PROJECT_IDS mapping in [solidity.yml](./solidity.yml) under the "Get Project ID" step.
+
+   Example format in solidity.yml:
+   ```yaml
+   PROJECT_IDS:
+     contracts-core: ${{ secrets.VERCEL_CONTRACT_DOCS_PROJECT_ID }}
+     your-package: ${{ secrets.VERCEL_YOUR_PACKAGE_DOCS_PROJECT_ID }}
+   ```

Comment on lines +6 to +7
2. The project creation page will force you to import a project from github. Select any non-private repo, as this will be disconnected later.
![create project](./assets/vercel-create-project.png)me
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Clarify repository selection guidance

The instruction to "select any non-private repo" could be improved by recommending the use of a temporary public repository or a template specifically created for this purpose.

-2. The project creation page will force you to import a project from github. Select any non-private repo, as this will be disconnected later.
+2. The project creation page will force you to import a project from GitHub. Create and use a temporary public repository (or use our template at `example-repo-url`) for this step, as it will be disconnected later.

Committable suggestion skipped: line range outside the PR's diff.

Comment on lines +7 to +13
![create project](./assets/vercel-create-project.png)me
3. Go to the settings->git and disconnect the repo.
![disconnect repo](./assets/vercel-git-page.png)
4. Get the project id from vercel.
![project id](./assets/vercel-project-id.png)
5. Set the root directory to the path in the repo where your package is located + docs
![root directory](./assets/root-dir.png)
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Missing images referenced in the documentation

The following images are referenced in the documentation but are missing from the repository:

  • ./assets/vercel-create-project.png
  • ./assets/vercel-git-page.png
  • ./assets/vercel-project-id.png
  • ./assets/root-dir.png
🔗 Analysis chain

Verify image references in the documentation

Let's verify that all referenced images exist in the correct location.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if all referenced images exist
for img in "vercel-create-project.png" "vercel-git-page.png" "vercel-project-id.png" "root-dir.png"; do
  if ! [ -f ".github/workflows/assets/$img" ]; then
    echo "Missing image: $img"
  fi
done

Length of output: 640


Script:

#!/bin/bash
# Check if assets directory exists
if [ -d ".github/workflows/assets" ]; then
  echo "Assets directory exists"
else
  echo "Assets directory does not exist"
fi

# Search for the image files anywhere in the repository
echo -e "\nSearching for images:"
fd -e png "vercel-create-project|vercel-git-page|vercel-project-id|root-dir"

Length of output: 232

Copy link

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5caf0bb
Status: ✅  Deploy successful!
Preview URL: https://4d9f9ace.sanguine-fe.pages.dev
Branch Preview URL: https://fix-solidity-md.sanguine-fe.pages.dev

View logs

@trajan0x trajan0x merged commit eb92a30 into master Jan 8, 2025
27 checks passed
@trajan0x trajan0x deleted the fix/solidity-md branch January 8, 2025 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M-ci Module: CI size/xs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant