2024-04-24 20:20:03 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: deploy main branch to live site
|
|
|
|
steps:
|
2024-05-16 01:38:25 +00:00
|
|
|
- name: php syntax check
|
|
|
|
image: php:8.3.7-cli
|
|
|
|
commands:
|
|
|
|
- for f in $(find /drone -name '*.php'); do php -l "$f"; done
|
|
|
|
# If a custom block is in use, uncomment this (and make sure package.json
|
|
|
|
# includes `scripts.build`, and change the `depends_on` below
|
|
|
|
# - name: compile custom block
|
|
|
|
# image: node:18.18.2
|
|
|
|
# commands:
|
|
|
|
# - npm install
|
|
|
|
# - npm run build
|
|
|
|
# depends_on:
|
|
|
|
# - php syntax check
|
2024-04-24 20:20:03 +00:00
|
|
|
- name: docker cp deploy
|
|
|
|
image: git.coopcloud.tech/coop-cloud/docker-cp-deploy:latest
|
|
|
|
settings:
|
|
|
|
host: server.example.com
|
2024-05-16 01:44:36 +00:00
|
|
|
service: ${REPO_NAME_SNAKE}
|
|
|
|
source: wp-content/themes/${REPO_NAME}
|
|
|
|
exec_pre: rm -rf /var/www/html/wp-content/themes/${REPO_NAME}/*
|
2024-04-24 20:20:03 +00:00
|
|
|
exec: composer install
|
|
|
|
dest: /var/www/html/
|
|
|
|
deploy_key:
|
|
|
|
from_secret: drone_ssh_server.example.com
|
2024-05-16 01:38:25 +00:00
|
|
|
depends_on:
|
|
|
|
- php syntax check
|
2024-04-24 20:20:03 +00:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- main
|