Skip to content

chore: setup github cd #1

chore: setup github cd

chore: setup github cd #1

Workflow file for this run

name: Deploy to aws
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy to aws
runs-on: ubuntu-latest
steps:
- name: Deploy to Dev using SSH
env:
AWS_EC2_PEM: ${{ secrets.AWS_EC2_PEM }}
AWS_EC2_PUBLIC_IP: ${{ secrets.AWS_EC2_PUBLIC_IP }}
AWS_EC2_USERNAME: ${{ secrets.AWS_EC2_USERNAME }}
run: |
echo "$AWS_EC2_PEM" > private.pem && chmod 600 private.pem
ssh -o StrictHostKeyChecking=no -i private.pem ${AWS_EC2_USERNAME}@${AWS_EC2_PUBLIC_IP} 'chmod +x ~/deployServer.sh && ~/deployServer.sh'