Skip to content

Add Fly.io Auto-Deploy Workflows for DOGE-AI (Closes #97) #146

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

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

silaspath
Copy link
Contributor

This PR addresses issue #97 by setting up GitHub Actions workflows for auto-deploying the two apps in the DOGE-AI monorepo to Fly.io. Below are the changes and instructions for the upstream maintainer to integrate this into the original repo.

Changes

  • Added .github/workflows/deploy-agent.yaml to handle auto-deployment of the "agent" app to Fly.io.
  • Added .github/workflows/deploy-crawler.yaml to handle auto-deployment of the "crawler" app to Fly.io.
  • Replaced fly.toml files for both apps (apps/agent/fly.toml and apps/crawler/fly.toml) to work with my Fly.io account for testing purposes.

Notes

  • The fly.toml files in this PR are specific to my Fly.io environment (app names, etc.). These changes are for demonstration and should not be merged as-is.

Setup Instructions for Upstream

  1. Revert or Ignore fly.toml Changes:

    • Please revert the fly.toml files to their original state (or ignore my changes to apps/agent/fly.toml and apps/crawler/fly.toml).
    • Update them with your own Fly.io app names and configurations after creating the apps with flyctl apps create <app-name> for each.
  2. Add GitHub Secrets:

    • Generate two Fly.io API keys from your Fly.io dashboard.
    • Add them as GitHub Secrets in the repo settings under Secrets and Variables > Actions:
      • FLY_API_TOKEN_AGENT: API key for the agent app.
      • FLY_API_TOKEN_CRAWLER: API key for the crawler app.
  3. Update Workflow Triggers:

    • In both deploy-agent.yaml and deploy-crawler.yaml, update the on.push.branches field from my fork’s branch to main (or your preferred branch for deployment):
      on:
        push:
          branches:
            - main
      
  4. Test the Deployment:

    • Push a change to the main branch to trigger the workflows and verify the deployments.

Testing

I’ve tested these workflows in my fork, and they successfully deploy to Fly.io using my environment. After following the steps above, they should work for your setup too.

Let me know if you need any clarification or adjustments!

Copy link

vercel bot commented Mar 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dogeai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2025 1:39am

Copy link

vercel bot commented Mar 7, 2025

@silaspath is attempting to deploy a commit to the Saihajpreet Singh's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Owner

@saihaj saihaj left a comment

Choose a reason for hiding this comment

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

thanks for spending time on this.

No need for any of the changes in the agent/, crawler/ dirs.

as for how I think we run this in prod

  1. update the existing ci.yaml and make it depend on check this way we first let CI pass then trigger deploy. We restrict it to just main branch.
  2. create a manual trigger which takes in dir, branch or commit name https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_dispatch this can help with hot deploys

@saihaj
Copy link
Owner

saihaj commented Mar 7, 2025

(I can take over this PR and adjust it)

@silaspath
Copy link
Contributor Author

(I can take over this PR and adjust it)

Sounds good! Available if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants