Skip to content

Merge pull request #1 from HRulier/feature/operations #22

Merge pull request #1 from HRulier/feature/operations

Merge pull request #1 from HRulier/feature/operations #22

Workflow file for this run

name: Deploy Ubuntu Server Project
on:
push:
branches:
- development
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4 # Updated version
- name: Add SSH private key to agent
uses: webfactory/ssh-agent@v0.9.0 # Updated version
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Deploy to Server
env:
SERVER_USER: ${{ secrets.SERVER_USER }}
SERVER_IP: ${{ secrets.SERVER_IP }}
SSH_PORT: ${{ secrets.SSH_PORT }}
APP_DIR: ${{ secrets.APP_DIR }}
run: |
ssh -o StrictHostKeyChecking=no -p $SSH_PORT $SERVER_USER@$SERVER_IP "
cd $APP_DIR &&
git pull origin development &&
cd .. &&
docker compose -f docker-compose-prod.yml up --build -d api
"