2021-12-16 10:41:15 +01:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: deploy
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: build-site
|
|
|
|
image: node:latest
|
|
|
|
commands:
|
|
|
|
- npm install
|
|
|
|
- npm run build
|
2021-12-16 12:22:56 +01:00
|
|
|
when:
|
2021-12-16 12:27:52 +01:00
|
|
|
branch:
|
|
|
|
- main
|
2021-12-16 12:22:56 +01:00
|
|
|
event:
|
|
|
|
- push
|
|
|
|
|
2021-12-16 10:41:15 +01:00
|
|
|
- name: deploy
|
2021-12-16 12:22:56 +01:00
|
|
|
image: cschlosser/drone-ftps
|
2021-12-16 10:41:15 +01:00
|
|
|
environment:
|
2021-12-16 12:22:56 +01:00
|
|
|
FTP_USERNAME:
|
2021-12-16 10:41:15 +01:00
|
|
|
from_secret: username
|
2021-12-16 12:22:56 +01:00
|
|
|
FTP_PASSWORD:
|
2021-12-16 10:41:15 +01:00
|
|
|
from_secret: password
|
2021-12-16 12:22:56 +01:00
|
|
|
PLUGIN_HOSTNAME:
|
2021-12-16 10:41:15 +01:00
|
|
|
from_secret: host
|
2021-12-16 12:22:56 +01:00
|
|
|
PLUGIN_DEST_DIR: /www
|
|
|
|
PLUGIN_SRC_DIR: /build
|
|
|
|
PLUGIN_EXCLUDE: (.htaccess)|(.git)
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- main
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
|
|
|
|
# - name: deploy
|
|
|
|
# image: cschlosser/drone-ftps
|
|
|
|
# hostname:
|
|
|
|
# from_secret: net2ftp.cluster027.hosting.ovh.net
|
|
|
|
# environment:
|
|
|
|
# USERNAME:
|
|
|
|
# from_secret: username
|
|
|
|
# PASSWORD:
|
|
|
|
# from_secret: password
|
|
|
|
# HOST:
|
|
|
|
# from_secret: host
|
|
|
|
# commands:
|
|
|
|
# - echo $USERNAME
|
|
|
|
# - echo $PASSWORD
|
|
|
|
# - echo $HOST
|
|
|
|
# - lftp -c "open -u $USERNAME,$PASSWORD $HOST; mirror -Rnev ./build ./www --ignore-time --parallel=10 --exclude .htaccess --exclude-glob .git* --exclude .git/"
|