29 lines
595 B
YAML
29 lines
595 B
YAML
name: Deploy Production
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: docker
|
|
container:
|
|
image: docker:latest
|
|
volumes:
|
|
- /opt/apps/api-finance:/app
|
|
steps:
|
|
- name: Install git
|
|
run: apk add --no-cache git
|
|
|
|
- name: Pull latest code
|
|
run: |
|
|
cd /app
|
|
git pull origin main || git clone --depth 1 https://git.ai-assistant-bot.xyz/root/finance-api.git .
|
|
|
|
- name: Build & Deploy
|
|
run: |
|
|
cd /app
|
|
docker compose -f docker-compose.server.yml up -d --build
|