test
continuous-integration/drone/push Build is failing

This commit is contained in:
2026-10-07 20:39:50 +10:00
parent 52e68c7041
commit d067afdf7b
+9 -9
View File
@@ -3,7 +3,7 @@ type: docker
name: ci-cd-full
steps:
# ШАГ 1: Сборка и пуш образа в Gitea Registry
# Step 1: Build and push image to Gitea Registry
- name: docker-build
image: plugins/docker
pull: always
@@ -18,7 +18,7 @@ steps:
password:
from_secret: registry_password
# ШАГ 2: Деплой на сервер (через SSH)
# Step 2: Deploy via SSH
- name: ssh-deploy
image: appleboy/drone-ssh:1.7
pull: always
@@ -32,23 +32,23 @@ steps:
password:
from_secret: deploy_password
script_stop: true
# Важно: script здесь — это команды, которые выполнятся НА СЕРВЕРЕ, а не в контейнере
# The pipe '|' ensures the whole block is sent as a script to the server
script: |
# 1. Создаем структуру папок в домашней директории пользователя
# 1. Create directory structure in home folder (no permission issues here)
mkdir -p ~/na-granicelife/assets/mp4
# 2. Клонируем код во временную папку на сервере
# 2. Clone code to temp folder on the server
rm -rf /tmp/na-granice-deploy
git clone --depth 1 --branch main https://gitea.allowlgroup.ru/na-granicelife.ru/front.git /tmp/na-granice-deploy
# 3. Копируем файлы, КРОМЕ папки с видео
# find ищет файлы, -not исключает mp4, cp копирует их в целевую папку
# 3. Copy all files EXCEPT the mp4 folder
# find locates files, -not excludes the mp4 path, cp copies them
find /tmp/na-granice-deploy -type f -not -path '*assets/mp4*' -exec cp --no-preserve=mode {} ~/na-granicelife \;
# 4. Чистим временную папку
# 4. Clean up temp folder
rm -rf /tmp/na-granice-deploy
# 5. ВАЖНО: Все команды Docker выполняются НА СЕРВЕРЕ напрямую
# 5. Run docker compose commands directly on the server
cd ~/na-granicelife
docker compose pull web
docker compose up -d