Skip to content

Merge pull request #107 from MLAI-AUS-Inc/codex/domain-scan-routing-fix #104

Merge pull request #107 from MLAI-AUS-Inc/codex/domain-scan-routing-fix

Merge pull request #107 from MLAI-AUS-Inc/codex/domain-scan-routing-fix #104

Workflow file for this run

name: Deploy to Digital Ocean
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy via SSH
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.DO_HOST }}
username: ${{ secrets.DO_USERNAME }}
key: ${{ secrets.DO_SSH_KEY }}
script: |
# Stop if any command fails
set -e
# Define deployment directory
DEPLOY_DIR="/root/roo"
# Clone repo if it doesn't exist, otherwise pull
if [ ! -d "$DEPLOY_DIR" ]; then
echo "Cloning repository..."
git clone https://github.com/MLAI-AUS-Inc/roo.git "$DEPLOY_DIR"
else
echo "Updating repository..."
cd "$DEPLOY_DIR"
git pull origin main
fi
# Go to the sub-project directory
cd "$DEPLOY_DIR/roo-standalone"
# Restart the app
docker compose up -d --build --remove-orphans
# Clean up space
docker image prune -f