Add drone
continuous-integration/drone/push Build is passing Details

This commit is contained in:
philipp lang 2024-10-09 20:17:09 +02:00
parent a57bc749ea
commit 67dceeecb1
1 changed files with 39 additions and 0 deletions

39
.drone.yml Normal file
View File

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