changed php composer to composer in the main.yml workflow #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to EC2 instance | |
on: | |
push: | |
branches: [main] | |
jobs: | |
deployment: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4.1.7 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-region: eu-north-1 | |
aws-access-key-id: ${{ secrets.ACCESS_KEY }} | |
aws-secret-access-key: ${{ secrets.SECRET_ACCESS_KEY }} | |
- name: Deploy and build | |
run: | | |
aws ssm send-command \ | |
--instance-ids "i-0ceef8e041cbec9af" \ | |
--document-name "AWS-RunShellScript" \ | |
--parameters 'commands=["sudo -u ubuntu /bin/bash -c \"export PATH=/run/user/1000/fnm_multishells/336033_1726136558506/bin:$PATH && cd /var/www/TalkTherapy && git pull origin main && npm run build && composer install && php artisan cache:clear \"",]' \ | |
--comment "Deploying TalkTherapy code" |