Skip to content

Commit

Permalink
Update auto-deployment.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wwingyou authored Mar 24, 2024
1 parent 47cdc9f commit e8de2af
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/auto-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Connect to EC2
env:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
private_key: ${{ secrets.EC2_PRIVATE_KEY }}
run: |
echo $private_key > private_key.pem
chmod 400 private_key.pem
ssh -o StrictHostKeyChecking=no -i private_key.pem "${username}@${host}" echo hello
- uses: actions/[email protected]
- name: Show git status
run: git status
Expand All @@ -34,12 +43,3 @@ jobs:
chmod 755 gradlew
./gradlew bootJar
./gradlew jarDir
- name: Connect to EC2
env:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
private_key: ${{ secrets.EC2_PRIVATE_KEY }}
run: |
echo $private_key > private_key.pem
chmod 440 private_key.pem
ssh -o StrictHostKeyChecking=no -i private_key.pem "${username}@${host}" echo hello

0 comments on commit e8de2af

Please sign in to comment.