Skip to content

Instantly share code, notes, and snippets.

View jonahgeek's full-sized avatar
🏠
Too Mobile

Jonathan Mwebaze jonahgeek

🏠
Too Mobile
View GitHub Profile
  1. Setting up GitHub Actions:

    • In your GitHub repository, navigate to the "Actions" tab and set up a new workflow.
    • Create a YAML file (e.g., .github/workflows/deploy.yml) to define your workflow.
  2. Configure Workflow:

    • Define triggers for the workflow. In your case, it could be triggered on push events to the master branch.
  3. Define Workflow Steps:

    • Use actions to SSH into your AWS EC2 instance. You can use an action like appleboy/ssh-action.
    • Within the SSH session, execute commands to pull the latest changes from the GitHub repository on your EC2 instance.