Skip to content

Update deploy-to-ec2.yml #1

Update deploy-to-ec2.yml

Update deploy-to-ec2.yml #1

Workflow file for this run

name: deploy-to-ec2
on:
push:
branches: [main]
jobs:
deploy:
name: Deploying NodeJS Application
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: deploying application to EC2
env:
PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }}
HOSTNAME: ${{ secrets.SERVER_HOST }}
USER_NAME: ${{ secrets.SERVER_USERNAME }}
run: |
echo "$PRIVATE_KEY" > private_key && chmod 600 private_key
ssh -o StrictHostKeyChecking=no -i private_key ${USER_NAME}@${HOSTNAME} bash ./fuse/deploy.sh