This commit is contained in:
59
.drone.yml
Normal file
59
.drone.yml
Normal file
@@ -0,0 +1,59 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: deploy-to-remote
|
||||
|
||||
steps:
|
||||
# - name: display environment variables
|
||||
# image: busybox
|
||||
# pull: if-not-exists
|
||||
# commands:
|
||||
# - printenv
|
||||
- name: lint
|
||||
image: osshelp/drone-linter
|
||||
settings:
|
||||
skip_yml: true
|
||||
markdown_files:
|
||||
- schedule/schedule.md
|
||||
- name: copy-file-over-scp
|
||||
image: appleboy/drone-scp
|
||||
settings:
|
||||
host:
|
||||
from_secret: SSH_HOST
|
||||
username:
|
||||
from_secret: SSH_USER
|
||||
port: 22
|
||||
ssh_key:
|
||||
from_secret: ssh-key
|
||||
source:
|
||||
- schedule/schedule.md
|
||||
target:
|
||||
from_secret: TARGET
|
||||
strip_components: 0
|
||||
overwrite: true
|
||||
known_hosts:
|
||||
from_secret: KNOWN_HOST
|
||||
- name: run hugo
|
||||
image: appleboy/drone-ssh
|
||||
environment:
|
||||
HUGO_ROOT:
|
||||
from_secret: HUGO_ROOT
|
||||
settings:
|
||||
envs: [ HUGO_ROOT ]
|
||||
host:
|
||||
from_secret: SSH_HOST
|
||||
username:
|
||||
from_secret: SSH_USER
|
||||
port: 22
|
||||
ssh_key:
|
||||
from_secret: ssh-key
|
||||
known_hosts:
|
||||
from_secret: KNOWN_HOST
|
||||
script:
|
||||
- cd $HUGO_ROOT
|
||||
- hugo
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
- push
|
||||
Reference in New Issue
Block a user