fairdataihub / codefair-app

Your coding assistant to make research software reusable without breaking a sweat!
https://codefair.io
MIT License
7 stars 2 forks source link

👷 ci: setup for staging env #103

Closed megasanjay closed 6 days ago

megasanjay commented 6 days ago

Summary by Sourcery

Set up CI and deployment configurations for a staging environment, including new deployment jobs and environment variable updates.

CI:

Deployment:

fairdataihub-bot[bot] commented 6 days ago

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!

sourcery-ai[bot] commented 6 days ago

Reviewer's Guide by Sourcery

This PR sets up the CI/CD infrastructure for staging environment by splitting the deployment into two separate jobs (bot and UI), updating environment variables naming, and adding necessary deployment configurations for the UI component using Kamal.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Split deployment workflow into separate bot and UI jobs
  • Renamed 'deploy' job to 'deploy-bot'
  • Added new 'deploy-ui' job with staging environment configuration
  • Added Kamal deployment steps for both jobs
  • Updated environment variables for each deployment
.github/workflows/deploy-main.yml
.github/workflows/deploy-staging.yml
Standardized GitHub-related environment variable naming
  • Renamed GITHUBAPP variables to GHAPP
  • Updated PRIVATE_KEY to GH_APP_PRIVATE_KEY
  • Added handling for newline characters in private key
  • Separated OAuth and App credentials
bot/config/deploy.yml
ui/server/utils/auth.ts
ui/server/utils/auth/isOrganizationMember.ts
ui/server/utils/auth/repoWritePermissions.ts
bot/api/github/webhooks.js
bot/main.js
Added UI deployment configuration using Kamal
  • Created Dockerfile for UI component
  • Added compose.yml for container orchestration
  • Created deploy.yml for Kamal configuration
  • Added deployment hooks directory structure
ui/config/deploy.yml
ui/Dockerfile
ui/compose.yml
ui/.kamal/hooks/*

Tips and commands #### Interacting with Sourcery - **Trigger a new review:** Comment `@sourcery-ai review` on the pull request. - **Continue discussions:** Reply directly to Sourcery's review comments. - **Generate a GitHub issue from a review comment:** Ask Sourcery to create an issue from a review comment by replying to it. - **Generate a pull request title:** Write `@sourcery-ai` anywhere in the pull request title to generate a title at any time. - **Generate a pull request summary:** Write `@sourcery-ai summary` anywhere in the pull request body to generate a PR summary at any time. You can also use this command to specify where the summary should be inserted. #### Customizing Your Experience Access your [dashboard](https://app.sourcery.ai) to: - Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others. - Change the review language. - Add, remove or edit custom review instructions. - Adjust other review settings. #### Getting Help - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).
fairdataihub-bot[bot] commented 6 days ago

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!

fairdataihub-bot[bot] commented 6 days ago

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!