Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

192
Views
Using Gitihub actions for CI CD on aws ec2 machine?

i am new github actions workflow and was wondering that is it possible that i set my ec2 machine directly for CI and CD after every push.

I have seen that it is possible with ECS , but i wanted a straight forward solution as we are trying this out on our Dev environment we don't want over shoot our budget.

is it possible , if yes how can i achieve it ?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

If you build your code in GitHub Actions, and just want to copy the package over existing EC2, you can use SCP files action plugin

https://github.com/marketplace/actions/scp-files

- name: copy file via ssh key
  uses: appleboy/scp-action@master
  with:
    host: ${{ secrets.HOST }}
    username: ${{ secrets.USERNAME }}
    port: ${{ secrets.PORT }}
    key: ${{ secrets.KEY }}
    source: "tests/a.txt,tests/b.txt"
    target: "test"

If you have any other AWS resource which interacts with EC2 (or any other AWS service) and you want to use AWS CLI, you can use AWS Credentials Action

https://github.com/aws-actions/configure-aws-credentials

- name: Configure AWS credentials from Test account
  uses: aws-actions/configure-aws-credentials@v1
  with:
     aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY_ID }}
     aws-secret-access-key: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY }}
     aws-region: us-east-1

 - name: Copy files to the test website with the AWS CLI
   run: |
     aws s3 sync . s3://my-s3-test-website-bucket
over 4 years ago · Santiago Trujillo Report

0

Here there is a nice article. The goal of article is to build a CI/CD stack with Github Actions + AWS EC2, CodeDeploy and S3.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!