Skip to content

Commit

Permalink
Fix key folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
everaldorodrigo committed Nov 29, 2023
1 parent 65c2efc commit 51d7da1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deploy_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ jobs:
#!/bin/bash
# Save the private key to a file
echo "$AWS_EC2_SSH_KEY" > key.pem
chmod 400 key.pem # Set proper permissions
echo "$AWS_EC2_SSH_KEY" > ~/.aws/key.pem
chmod 400 ~/.aws/key.pem # Set proper permissions
# Fetch EC2 instances from Auto Scaling Group
INSTANCE_IDS=$(aws autoscaling describe-auto-scaling-groups --auto-scaling-group-names $AWS_AUTO_SCALING_GROUP_NAME --query "AutoScalingGroups[0].Instances[*].InstanceId" --output json)
Expand All @@ -67,8 +67,8 @@ jobs:
echo "Instance IP: $INSTANCE_IP"
echo "ssh -i key.pem -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@$INSTANCE_IP 'cd /home/ubuntu && ./update_mygeneset pull_src'"
# ssh -i key.pem -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@$INSTANCE_IP 'cd /home/ubuntu && ./update_mygeneset pull_src'
echo "ssh -i ~/.aws/key.pem -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@$INSTANCE_IP 'cd /home/ubuntu && ./update_mygeneset pull_src'"
ssh -i ~/.aws/key.pem -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@$INSTANCE_IP 'cd /home/ubuntu && ./update_mygeneset pull_src'
done
- name: Close SSH port to GitHub Actions IP (even on failure)
Expand Down

0 comments on commit 51d7da1

Please sign in to comment.