Files
canina/.gitea/workflows/deploy.yml
T
parsa aghaei 501addc909
Deploy Canina / deploy (push) Successful in 5m39s
fix: CI/CD pipeline, dynamic API URLs, Dockerfile fixes
- Backend Dockerfile: add chown for node_modules (Prisma permissions fix)
- Frontend Dockerfile: add ARG/ENV for NEXT_PUBLIC_API_URL, VITE_API_URL
- nginx.conf: template with __PLACEHOLDERS__ for per-env substitution
- deploy.yml: SSH keepalive, sudo for VPN
- api.ts: dynamic API URL via env vars instead of hardcoded
- next.config.ts: rewrite only in development mode
- scripts: deploy.sh, compose.stage.yml, compose.prod.yml
2026-07-28 16:37:05 +03:30

35 lines
850 B
YAML

name: Deploy Canina
on:
push:
branches:
- main
- develop
jobs:
deploy:
runs-on: canina
timeout-minutes: 15
steps:
- name: Setup SSH key
shell: sh
env:
SSH_KEY: ${{ secrets.DEPLOY_KEY }}
run: |
mkdir -p ~/.ssh
echo "$SSH_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -p 2234 -H 172.17.0.1 >> ~/.ssh/known_hosts
- name: Deploy
shell: sh
timeout-minutes: 12
run: |
BRANCH="${GITHUB_REF_NAME}"
echo "Deploying branch: ${BRANCH}"
ssh -o StrictHostKeyChecking=no \
-o ServerAliveInterval=30 \
-o ServerAliveCountMax=30 \
-p 2234 devops@172.17.0.1 \
"sudo bash /opt/services/scripts/depcanina.sh ${BRANCH}"