diff --git a/.cursorignore b/.cursorignore new file mode 100644 index 0000000..b345938 --- /dev/null +++ b/.cursorignore @@ -0,0 +1,2 @@ +# Исключить все файлы .env из игнорирования Cursor +!.env diff --git a/.woodpecker.yml b/.woodpecker.yml index 97d90d1..53813cc 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -15,15 +15,17 @@ steps: - ssh-keyscan 192.168.0.109 >> ~/.ssh/known_hosts # Копирование файлов - - rsync -av ./ \ + - | + rsync -av \ --exclude='.git' \ --exclude='.woodpecker.yml' \ - deployer@192.168.0.109:/opt/testbot-git/ + --exclude='.cursorignore' \ + ./ deployer@192.168.0.109:/opt/testbot-git/ - # Или (вариант 2: git clone на целевом сервере) - # - ssh -i ~/.ssh/id_rsa deployer@целевой-сервер "cd /var/www/myapp && git pull" - - ssh -i ~/.ssh/id_rsa deployer@192.168.0.109 \ + - | + ssh -i ~/.ssh/id_rsa deployer@192.168.0.109 \ "cd /opt/testbot-git/services && chmod +x post-deploy.sh && ./post-deploy.sh" + # Выполнение команд на целевом сервере # - ssh -i ~/.ssh/id_rsa deployer@целевой-сервер " # cd /var/www/myapp && @@ -31,6 +33,7 @@ steps: # sudo systemctl restart myservice && # echo '✅ Deploy completed' # " + when: event: push branch: main