Skip to content

almost done

almost done #48

Workflow file for this run

name: Deploy to EC2
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Deploy to EC2
run: |
aws ssm send-command --instance-ids ${{ secrets.INSTANCE_ID }} --document-name "AWS-RunShellScript" --comment "Deploy application" --parameters "{\"commands\":[\"sudo -u ec2-user bash /home/ec2-user/befastapi/Moodle_VirtualAssistant_BE/deploy.sh\"]}"