blog/.drone.yml

76 lines
1.9 KiB
YAML
Raw Normal View History

2020-04-11 18:01:23 +00:00
kind: pipeline
name: default
steps:
- name: prends_des_branches
image: alpine/git
commands:
- git submodule init
- git submodule update --recursive --remote
- name: construis_ton_nid
image: plugins/hugo
settings:
2020-12-10 14:54:52 +00:00
hugo_version: 0.79.0
2020-04-11 18:01:23 +00:00
extended: false
validate: true
# config: hugo/config.toml
# content: hugo/content
# layout: hugo/layout
# output: hugo/public
# theme: hugo/themes/hugo-theme-hello-friend-ng/
url: https://blog.goe.land
- name: read
image: alpine/git
commands:
- ls
- ls public/
2022-02-03 19:54:35 +00:00
#- name: deploie_tes_ailes
# image: appleboy/drone-scp
# settings:
# host: {from_secret: SCP_HOSTNAME}
# port: {from_secret: SCP_PORT}
# username: {from_secret: SCP_USERNAME}
# #password: {from_secret: SCP_PASSWORD}
# key: {from_secret: SCP_KEY}
# source: public/
# strip_components: 1
# target: {from_secret: SCP_TARGET_DIRECTORY}
# #target: /srv/apps/blog/data/www/public
# rm: true
2022-02-03 20:16:40 +00:00
- name: deploy
2022-02-03 20:13:02 +00:00
image: alpine/git
2022-02-03 20:10:42 +00:00
environment:
2022-02-03 20:19:55 +00:00
SCP_KEY:
2022-02-03 20:10:42 +00:00
from_secret: SCP_KEY
2022-02-03 20:19:55 +00:00
SCP_HOSTNAME:
2022-02-03 20:10:42 +00:00
from_secret: SCP_HOSTNAME
2022-02-03 20:19:55 +00:00
SCP_USER:
2022-02-03 20:10:42 +00:00
from_secret: SCP_USER
2022-02-03 20:19:55 +00:00
SCP_PORT:
2022-02-03 20:10:42 +00:00
from_secret: SCP_PORT
2022-02-03 20:19:55 +00:00
SCP_TARGET:
2022-02-03 20:10:42 +00:00
from_secret: SCP_TARGET_DIRECTORY
commands:
2022-02-03 20:17:13 +00:00
- mkdir $HOME/.ssh
2022-02-03 20:10:42 +00:00
- echo "$SCP_KEY" > $HOME/.ssh/id_rsa
2022-02-03 20:21:00 +00:00
- scp -rP $SCP_PORT -i $HOME/.ssh/id_rsa public/ $SCP_USER@$SCP_HOSTNAME:$SCP_TARGET_DIRECTORY
2020-04-11 18:01:23 +00:00
- name: rereveille_toi
image: appleboy/drone-ssh
settings:
2022-02-03 19:59:01 +00:00
host:
from_secret: SCP_HOSTNAME
port:
from_secret: SCP_PORT
username:
from_secret: SCP_USERNAME
2022-02-03 19:51:02 +00:00
#password: {from_secret: SCP_PASSWORD}
2022-02-03 19:59:01 +00:00
key:
from_secret: SCP_KEY
2020-04-11 18:01:23 +00:00
script:
#- {from_secret: SSH_COMMAND}
- docker-compose -f /srv/apps/blog/docker-compose.yml restart