Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
snoow-sub authored Nov 24, 2024
1 parent 4675552 commit 7dfd7ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
# SSH接続して、git pullする
echo "${{ secrets.GIT_PRIVATE_KEY }}" > private_key
chmod 600 private_key
ssh -oStrictHostKeyChecking=no ${{ secrets.EC2_USER_NAME }}@${{ secrets.EC2_HOST_NAME }} -i private_key "cd /home/ubuntu/cc-fullstuck-project/ && ls -la"
ssh -oStrictHostKeyChecking=no ${{ secrets.EC2_USER_NAME }}@${{ secrets.EC2_HOST_NAME }} -i private_key "cd /home/ubuntu/cc-fullstuck-project/ && git checkout main && git pull origin main"
# SSHのセキュリティグループを閉じる
aws ec2 revoke-security-group-ingress --group-id ${{ secrets.EC2_SECURITY_GROUP_ID }} --protocol tcp --port 22 --cidr ${{ steps.ip.outputs.ipv4 }}/32

0 comments on commit 7dfd7ec

Please sign in to comment.