Skip to content

Merge pull request #56 from lukesuppa/comments #49

Merge pull request #56 from lukesuppa/comments

Merge pull request #56 from lukesuppa/comments #49

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
jobs:
Deploy:
name: Deploy to EC2
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: SSH into EC2 Instance
env:
HOSTNAME: ${{ secrets.TEST_EC2_PUBLIC_IP }}
USER_NAME: ${{ secrets.USER_NAME }}
PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
echo "$PRIVATE_KEY" > private_key && chmod 600 private_key
ssh -T -o StrictHostKeyChecking=no -i private_key ${USER_NAME}@${HOSTNAME} << EOF
cd /home/ec2-user/Mirrulations_Search
docker-compose down
docker system prune -a -f
git pull
docker-compose build
docker-compose up -d
EOF