-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from lordgrim18/build
perf(actions): connect to ec2 using ssh
- Loading branch information
Showing
1 changed file
with
11 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,15 +30,15 @@ jobs: | |
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v2 | ||
|
||
- name: Move to the directory containing the Dockerfile | ||
run: | | ||
cd .. | ||
cd .. | ||
cd .. | ||
cd ./app/Key-Ring | ||
- name: Update git branch | ||
run: git pull origin prod | ||
- name: Add SSH Key | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.EC2_SSH_KEY }} | ||
|
||
- name: Update Deployment | ||
run: make deploy | ||
- name: SSH into EC2 and deploy | ||
run: | | ||
ssh -o StrictHostKeyChecking=no ec2-user@${{ secrets.EC2_PUBLIC_IP }} << 'EOF' | ||
cd /path/to/your/project | ||
git pull origin prod | ||
make deploy | ||
EOF |