Conversation
|
Thank you for submitting this pull request! We appreciate your contribution to the project. Before we can merge it, we need to review the changes you've made to ensure they align with our code standards and meet the requirements of the project. We'll get back to you as soon as we can with feedback. Thanks again! |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Reviewer's GuideThis PR introduces Docker/Kamal-based deployment pipelines for production and per-branch preview environments, updates Next.js configuration for standalone builds and image handling, bumps core frontend dependencies, and makes minor content and tooling adjustments. Sequence diagram for preview environment deployment on branch pushsequenceDiagram
actor Developer
participant GitHubRepo
participant GitHubActions
participant Job_deploy_ui
participant Kamal
participant ContainerRegistry
participant AppServer
participant GitHubAPI
Developer->>GitHubRepo: push_commit_to_feature_branch
GitHubRepo-->>GitHubActions: push_event(branch_not_main_or_next)
GitHubActions->>Job_deploy_ui: start_deploy-preview-app_workflow
Job_deploy_ui->>Job_deploy_ui: compute_branch_slug_and_set_KAMAL_APP_NAME_DOMAIN
Job_deploy_ui->>GitHubAPI: find_open_PR_for_branch
GitHubAPI-->>Job_deploy_ui: PR_list
Job_deploy_ui->>GitHubAPI: create_or_update_PR_comment(in_progress)
Job_deploy_ui->>Kamal: kamal_deploy_preview
Kamal->>ContainerRegistry: build_and_push_image
Kamal->>AppServer: connect_via_ssh
Kamal->>AppServer: pull_image_and_run_container
AppServer->>AppServer: start_next_standalone_server
Job_deploy_ui->>GitHubAPI: create_deployment_record
GitHubAPI-->>Job_deploy_ui: deployment_id
Job_deploy_ui->>GitHubAPI: set_deployment_status(success_or_failure)
Job_deploy_ui->>GitHubAPI: mark_previous_deployments_inactive
Job_deploy_ui->>GitHubAPI: update_PR_comment_with_preview_URL_or_failure
GitHubActions-->>Developer: workflow_status_with_preview_URL
Sequence diagram for preview environment removal on PR close or branch deletesequenceDiagram
actor Developer
participant GitHubRepo
participant GitHubActions
participant Job_remove_preview
participant Kamal
participant ContainerRegistry
participant GitHubAPI
Developer->>GitHubRepo: close_PR_or_delete_branch
GitHubRepo-->>GitHubActions: pull_request_closed_or_delete_event
GitHubActions->>Job_remove_preview: start_remove-preview_job
Job_remove_preview->>Job_remove_preview: determine_branch_name
Job_remove_preview->>Job_remove_preview: compute_branch_slug_and_KAMAL_APP_NAME
Job_remove_preview->>Kamal: kamal_remove_preview
Kamal->>Kamal: stop_and_remove_containers_for_branch
Job_remove_preview->>ContainerRegistry: crane_auth_login
Job_remove_preview->>ContainerRegistry: list_and_delete_images_for_KAMAL_APP_NAME
Job_remove_preview->>GitHubAPI: list_deployments_for_environment
GitHubAPI-->>Job_remove_preview: deployments_list
Job_remove_preview->>GitHubAPI: set_deployment_status_inactive
Job_remove_preview->>GitHubAPI: delete_environment
alt event_is_pull_request_closed
Job_remove_preview->>GitHubAPI: update_or_create_PR_comment_preview_removed
end
GitHubActions-->>Developer: workflow_status_preview_environment_removed
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Thanks for making updates to your pull request. Our team will take a look and provide feedback as soon as possible. Please wait for any GitHub Actions to complete before editing your pull request. If you have any additional questions or concerns, feel free to let us know. Thank you for your contributions! |
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- The lint-staged pattern was changed from targeting TypeScript/JavaScript files to
./src/**/*.{mx}, which likely no longer matches your source files and will effectively disable lint/format on commits; consider reverting or adjusting the glob to the intended extensions. - The home page title was updated to
The FAIR Data wave (next-21), which looks like a temporary marker for this branch or deployment and might be worth reverting or gating behind an environment variable before merging to a long-lived branch.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The lint-staged pattern was changed from targeting TypeScript/JavaScript files to `./src/**/*.{mx}`, which likely no longer matches your source files and will effectively disable lint/format on commits; consider reverting or adjusting the glob to the intended extensions.
- The home page title was updated to `The FAIR Data wave (next-21)`, which looks like a temporary marker for this branch or deployment and might be worth reverting or gating behind an environment variable before merging to a long-lived branch.
## Individual Comments
### Comment 1
<location path=".github/workflows/deploy-app.yml" line_range="93-97" />
<code_context>
+ # Step 9: Initial Kamal setup (only needed once per server)
+ # Note: This step might need to be run manually on the server first time
+ # to add the user to the docker group: `sudo usermod -aG docker $USER | newgrp docker | docker ps`
+ - id: kamal-deploy
+ run: kamal setup
+
+ # Step 10: Update GitHub deployment status based on outcome
</code_context>
<issue_to_address>
**suggestion (performance):** Running `kamal setup` on every production deploy may be heavier than necessary; `kamal deploy` is usually more appropriate.
Since `kamal setup` is generally required only once per server for initial provisioning, running it on every push to `next` adds unnecessary overhead and repeats setup work. For ongoing deployments, consider switching this step to `kamal deploy` (or `kamal deploy -d <env>`) and reserving `setup` for first-time server configuration.
```suggestion
# Step 9: Deploy application with Kamal
# Note: `kamal setup` is generally required only once per server for initial provisioning
# (e.g. adding the user to the docker group). Run that manually or in a separate workflow.
- id: kamal-deploy
run: kamal deploy
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| # Step 9: Initial Kamal setup (only needed once per server) | ||
| # Note: This step might need to be run manually on the server first time | ||
| # to add the user to the docker group: `sudo usermod -aG docker $USER | newgrp docker | docker ps` | ||
| - id: kamal-deploy | ||
| run: kamal setup |
There was a problem hiding this comment.
suggestion (performance): Running kamal setup on every production deploy may be heavier than necessary; kamal deploy is usually more appropriate.
Since kamal setup is generally required only once per server for initial provisioning, running it on every push to next adds unnecessary overhead and repeats setup work. For ongoing deployments, consider switching this step to kamal deploy (or kamal deploy -d <env>) and reserving setup for first-time server configuration.
| # Step 9: Initial Kamal setup (only needed once per server) | |
| # Note: This step might need to be run manually on the server first time | |
| # to add the user to the docker group: `sudo usermod -aG docker $USER | newgrp docker | docker ps` | |
| - id: kamal-deploy | |
| run: kamal setup | |
| # Step 9: Deploy application with Kamal | |
| # Note: `kamal setup` is generally required only once per server for initial provisioning | |
| # (e.g. adding the user to the docker group). Run that manually or in a separate workflow. | |
| - id: kamal-deploy | |
| run: kamal deploy |
Preview deployment removedThe preview environment for this branch has been removed. |
📝 Changed routes:
Commit 3ddb811 (https://fairdataihub-website-hc89crbb8-fairdataihub.vercel.app). |
|
Thanks for closing this pull request! If you have any further questions, please feel free to open a new issue. We are always happy to help! |

Summary by Sourcery
Add containerized Next.js deployment with Kamal and GitHub Actions workflows for production and per-branch preview environments.
New Features:
Enhancements:
CI:
Deployment: