From c3b68e03a341b6b99cfe19c261a2db9e9b7eebcb Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sun, 12 Apr 2026 18:37:26 +0700 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20.woodpecker.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker.yaml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.woodpecker.yaml b/.woodpecker.yaml index c58fa1a..997573b 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -1,17 +1,16 @@ # .woodpecker.yaml -pipeline: +steps: # Шаг 1: Сборка ассетов темы - build-assets: + - name: build-assets image: node:20-alpine commands: - cd wp-content/themes/xkater - # Проверяем, есть ли package.json (вдруг вы не используете сборщик) - if [ -f package.json ]; then npm ci && npm run build; fi when: branch: main # Шаг 2: Деплой на боевой сервер - deploy-production: + - name: deploy-production image: drillster/drone-rsync settings: user: ${PROD_SSH_USER} @@ -20,7 +19,7 @@ pipeline: source: ./wp-content/ target: ${REMOTE_PATH}/wp-content/ recursive: true - delete: false # ← ВАЖНО: не удалять то, чего нет в репозитории + delete: false args: > --exclude=uploads/ --exclude=plugins/akismet/ @@ -28,12 +27,11 @@ pipeline: --exclude=.git/ --exclude=node_modules/ --exclude=.DS_Store - --exclude=mu-plugins/local-dev-performance.php when: branch: main # Шаг 3: Очистка кэша на сервере - flush-cache: + - name: flush-cache image: appleboy/drone-ssh settings: host: ${PROD_SSH_HOST} @@ -41,9 +39,7 @@ pipeline: key: ${PROD_SSH_KEY} script: - cd ${REMOTE_PATH} - # Очистка кэша WordPress (если есть WP-CLI) - if command -v wp &> /dev/null; then wp cache flush; fi - # Или просто трогаем wp-config.php для сброса кэша опкодов - touch wp-config.php when: branch: main