chore: Update docker-compose.yml for backend #19
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 Production | |
on: | |
push: | |
branches: | |
- "deploy" | |
jobs: | |
build-frontend: | |
name: Building Frontend | |
runs-on: ubuntu-latest | |
steps: | |
- name: Establish ssh connection | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
key: ${{ secrets.SSH_KEY }} | |
passphrase: ${{ secrets.SSH_PASSPHRASE }} | |
port: ${{ secrets.SSH_PORT }} | |
username: ${{ secrets.SSH_USERNAME }} | |
script: | | |
cd /webapps/StudentsPortal/Frontend | |
git fetch origin | |
git checkout deploy | |
git pull | |
docker compose -f docker-compose.yml up -d --build | |
build-backend: | |
name: Building Backend | |
runs-on: ubuntu-latest | |
steps: | |
- name: Establish ssh connection | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
key: ${{ secrets.SSH_KEY }} | |
passphrase: ${{ secrets.SSH_PASSPHRASE }} | |
port: ${{ secrets.SSH_PORT }} | |
username: ${{ secrets.SSH_USERNAME }} | |
script: | | |
cd /webapps/StudentsPortal/Backend | |
git fetch origin | |
git checkout deploy | |
git pull | tee git-pull.log | |
docker compose -f docker-compose.yml up -d --build | tee docker-compose.log |