chore(Docs): Update project.md #81
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
name: Deploy to EC2 | |
on: | |
push: | |
branches: | |
- development | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up SSH | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.EC2_SSH_KEY }} | |
- name: Deploy to EC2 | |
run: | | |
ssh -o StrictHostKeyChecking=no [email protected] << 'EOF' | |
cd Aquarium-Capitalists || exit 1 | |
git fetch origin | |
git checkout development | |
git pull origin development | |
npm install | |
npm run build | |
pm2 restart react-app | |
EOF |