refactor: migrate to Forgejo workflows, remove GitHub Actions
Some checks failed
Deploy LLM Service / deploy (push) Failing after 8s
Some checks failed
Deploy LLM Service / deploy (push) Failing after 8s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
65e9fdf45b
commit
3864bce3d5
1 changed files with 16 additions and 14 deletions
|
|
@ -1,4 +1,4 @@
|
|||
name: Deploy to Infomaniak
|
||||
name: Deploy LLM Service
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
@ -15,10 +15,10 @@ env:
|
|||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup SSH
|
||||
run: |
|
||||
|
|
@ -27,12 +27,16 @@ jobs:
|
|||
chmod 600 ~/.ssh/deploy_key
|
||||
ssh-keyscan -H ${{ env.SERVER_HOST }} >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Install rsync
|
||||
run: |
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq && apt-get install -y -qq rsync > /dev/null
|
||||
|
||||
- name: Deploy files to server
|
||||
run: |
|
||||
rsync -avz --delete \
|
||||
-e "ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=no" \
|
||||
--exclude '.git' \
|
||||
--exclude '.github' \
|
||||
--exclude '.forgejo' \
|
||||
--exclude '__pycache__' \
|
||||
--exclude '*.pyc' \
|
||||
--exclude 'venv' \
|
||||
|
|
@ -44,24 +48,24 @@ jobs:
|
|||
run: |
|
||||
ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=no \
|
||||
${{ env.SERVER_USER }}@${{ env.SERVER_HOST }} << 'ENDSSH'
|
||||
|
||||
|
||||
echo "Installing dependencies..."
|
||||
cd /opt/ollama-webapp
|
||||
./venv/bin/pip install -r app/requirements.txt --quiet --upgrade
|
||||
|
||||
|
||||
echo "Updating systemd service file..."
|
||||
sudo cp /opt/ollama-webapp/app/deploy/ollama-webapp.service /etc/systemd/system/ollama-webapp.service
|
||||
sudo systemctl daemon-reload
|
||||
|
||||
|
||||
echo "Restarting service..."
|
||||
sudo systemctl restart ollama-webapp
|
||||
|
||||
|
||||
echo "Waiting for service to start..."
|
||||
sleep 5
|
||||
|
||||
|
||||
echo "Service status:"
|
||||
sudo systemctl status ollama-webapp --no-pager -l
|
||||
|
||||
|
||||
echo "Deployment complete!"
|
||||
ENDSSH
|
||||
|
||||
|
|
@ -69,17 +73,15 @@ jobs:
|
|||
run: |
|
||||
echo "Running health check..."
|
||||
sleep 3
|
||||
|
||||
# Health check via HTTPS on port 8000
|
||||
|
||||
HTTP_STATUS=$(curl -sk -o /dev/null -w "%{http_code}" \
|
||||
https://llm.poweron.swiss:8000/api/health || echo "000")
|
||||
|
||||
|
||||
if [ "$HTTP_STATUS" = "200" ]; then
|
||||
echo "Health check passed! (HTTP $HTTP_STATUS)"
|
||||
else
|
||||
echo "Health check failed! (HTTP $HTTP_STATUS)"
|
||||
echo "Note: SSL certificate must be installed on server first"
|
||||
# Don't fail deployment if health check fails (cert might not be ready)
|
||||
fi
|
||||
|
||||
- name: Deployment Summary
|
||||
Loading…
Reference in a new issue