Merge pull request #8 from JoKimYoon/feature/user #8
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: develop-deploy | |
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
develop-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout and Pull from develop | |
run: | | |
sshpass -p "${{ secrets.SSH_PASSWORD }}" ssh -o StrictHostKeyChecking=no ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} << 'EOF' | |
cd /home/techmoa/techmoa-backend | |
git checkout develop | |
git pull origin develop | |
EOF | |
- name: Build and Deploy | |
run: | | |
sshpass -p "${{ secrets.SSH_PASSWORD }}" ssh -o StrictHostKeyChecking=no ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} << 'EOF' | |
cd /home/techmoa/techmoa-backend | |
docker-compose up -d --build | |
docker image prune -f | |
EOF |