Build, Test, and Push Services #17
Workflow file for this run
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: Build and Deploy Microservices | |
on: | |
push: | |
branches: ["deploy"] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code and build on server | |
uses: appleboy/ssh-action@master | |
with: | |
host: 37.139.41.110 | |
username: ubuntu | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
script: | | |
cd /opt/backend-deploy | |
sudo git clone ${{ github.server_url }}/${{ github.repository }} . | |
sudo docker compose build --no-cache | |
sudo docker compose up -d --remove-orphans |