Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hongsw authored Oct 31, 2023
1 parent a6efcdf commit 999bebc
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,19 @@ jobs:
- run: npm ci
- run: npm run build --if-present
- run: npm test
- name: Build & Deploy
env:
PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
HOSTNAME: ${{secrets.SSH_HOST}}
USER_NAME: ${{secrets.USER_NAME}}

run: |
echo "$PRIVATE_KEY" > private_key && chmod 600 private_key
scp -i private_key README.md ${USER_NAME}@${HOSTNAME}:/home/ec2-user/app
ssh -o StrictHostKeyChecking=no -i private_key ${USER_NAME}@${HOSTNAME} '
cd /home/ec2-user/app &&
ls README.md
'

0 comments on commit 999bebc

Please sign in to comment.