This commit is contained in:
philipp lang 2024-10-25 17:58:02 +02:00
parent 969f197347
commit 10161a5f93
1 changed files with 24 additions and 24 deletions

View File

@ -3,32 +3,32 @@ type: docker
name: default name: default
workspace: workspace:
path: /drone/nami path: /drone/nami
steps: steps:
- name: node - name: node
image: node:18.13.0-slim image: node:18.13.0-slim
commands: commands:
- npm ci && npm run production && rm -R node_modules - npm ci && npm run production && rm -R node_modules
- name: deploy - name: deploy
image: php:8.1.6 image: php:8.1.6
environment: environment:
SSH_KEY: SSH_KEY:
from_secret: deploy_key from_secret: deploy_key
commands: commands:
- apt-get update > /dev/null - apt-get update > /dev/null
- apt-get install -y openssh-client rsync - apt-get install -y openssh-client rsync
- mkdir $HOME/.ssh - mkdir $HOME/.ssh
- echo "UserKnownHostsFile=/dev/null" >> $HOME/.ssh/config - echo "UserKnownHostsFile=/dev/null" >> $HOME/.ssh/config
- echo "StrictHostKeyChecking=no" >> $HOME/.ssh/config - echo "StrictHostKeyChecking=no" >> $HOME/.ssh/config
- echo "$SSH_KEY" > $HOME/.ssh/id_rsa - echo "$SSH_KEY" > $HOME/.ssh/id_rsa
- chmod 600 $HOME/.ssh/id_rsa - chmod 600 $HOME/.ssh/id_rsa
- rsync --delete -avzze ssh /drone/nami/ disco-st-katharina@zoomyboy.de:httpdocs/themes/vite-tailwind - rsync --delete -avzze ssh /drone/nami/ disco-st-katharina@zoomyboy.de:httpdocs/themes/vite-tailwind
- ssh disco-st-katharina@zoomyboy.de "cd httpdocs && php8.1 artisan cache:clear" - ssh disco-st-katharina@zoomyboy.de "cd httpdocs && php8.1 artisan cache:clear"
trigger: trigger:
event: event:
- push - push
branch: branch:
- master - master