Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
SarahAbuirmeileh authored Oct 25, 2023
1 parent 84f5347 commit fb08b4f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,12 @@ jobs:
- name: Deploy to EC2 Instances
run: |
IFS=' ' read -ra ips <<< "${{ steps.get_instance_ips.outputs.ips }}"
instances="${{ steps.get_instance_ips.outputs.ips }}"
IFS=' ' read -ra ips <<< "$instances"
for ip in "${ips[@]}"; do
ssh -i ${{ secrets.DEPLOYMENT_KEY }} github@$ip "docker compose -f docker-compose-prod.yml up -d"
if [ "$ip" != "13.40.105.150" ]; then
ssh -i ${{ secrets.DEPLOYMENT_KEY }} github@$ip "docker compose -f docker-compose-prod.yml up -d"
fi
done
env:
Expand Down

0 comments on commit fb08b4f

Please sign in to comment.