-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# 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. | ||
|
||
1. Click "Add New" on the home screen. | ||
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 | ||
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) | ||
Comment on lines
+7
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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:
🔗 Analysis chainVerify image references in the documentation Let's verify that all referenced images exist in the correct location. 🏁 Scripts executedThe 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 |
||
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. | ||
|
||
Comment on lines
+15
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 }}
+ ``` |
||
Now you're done. Any time you push to the main branch, the Solidity documentation will be deployed to vercel. |
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.