-
Notifications
You must be signed in to change notification settings - Fork 33
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
Conversation
WalkthroughThe changes involve updating the Changes
Poem
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this 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 benefitsConsider 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 configurationConsider 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 scenariosConsider 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
⛔ 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
7. Add the project id to the PROJECT_IDS mapping in [solidity.yml](./solidity.yml) under the "Get Project ID" step. | ||
|
There was a problem hiding this comment.
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 }}
+ ```
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 |
There was a problem hiding this comment.
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.
![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) |
There was a problem hiding this comment.
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
Deploying sanguine-fe with Cloudflare Pages
|
Description
Solidity workflow docs
Summary by CodeRabbit