test ci
This commit is contained in:
parent
855c1d60af
commit
b093005884
43
.drone.yml
Normal file
43
.drone.yml
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
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:
|
||||||
|
hugo_version: 0.92.0
|
||||||
|
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://ewen.korr.bzh
|
||||||
|
|
||||||
|
- name: deploy
|
||||||
|
image: alpine/git
|
||||||
|
environment:
|
||||||
|
SCP_KEY:
|
||||||
|
from_secret: SCP_KEY
|
||||||
|
SCP_HOSTNAME:
|
||||||
|
from_secret: SCP_HOSTNAME
|
||||||
|
SCP_USER:
|
||||||
|
from_secret: SCP_USER
|
||||||
|
SCP_PORT:
|
||||||
|
from_secret: SCP_PORT
|
||||||
|
SCP_COMMAND:
|
||||||
|
from_secret: SCP_COMMAND
|
||||||
|
commands:
|
||||||
|
- mkdir $HOME/.ssh
|
||||||
|
- echo "$SCP_KEY" > $HOME/.ssh/id_rsa
|
||||||
|
- ssh-keyscan -t rsa -p $SCP_PORT $SCP_HOSTNAME >> $HOME/.ssh/known_hosts
|
||||||
|
- chmod -R og-rw $HOME/.ssh/
|
||||||
|
- scp -r -P $SCP_PORT -i $HOME/.ssh/id_rsa public $SCP_USER@$SCP_HOSTNAME:~/
|
||||||
|
- ssh -p $SCP_PORT -i $HOME/.ssh/id_rsa $SCP_USER@$SCP_HOSTNAME 'rm -rvf /srv/apps/blog/data/www/publcic/*; mv ~/public/* /srv/apps/blog/data/www/public/; docker-compose -f /srv/apps/blog/docker-compose.yml restart; rm -rvf ~/public'
|
|
@ -1,43 +1,59 @@
|
||||||
kind: pipeline
|
pipeline:
|
||||||
name: default
|
fetch:
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: prends_des_branches
|
|
||||||
image: alpine/git
|
image: alpine/git
|
||||||
commands:
|
commands:
|
||||||
- git submodule init
|
- git submodule init
|
||||||
- git submodule update --recursive --remote
|
- git submodule update --recursive --remote
|
||||||
|
hugo-build:
|
||||||
|
- image: klakegg/hugo:0.105.0-alpine-ci
|
||||||
|
- commands:
|
||||||
|
- "hugo"
|
||||||
|
test:
|
||||||
|
- image: alpine/git
|
||||||
|
- commands:
|
||||||
|
- ls
|
||||||
|
- pwd
|
||||||
|
|
||||||
- name: construis_ton_nid
|
|
||||||
image: plugins/hugo
|
|
||||||
settings:
|
|
||||||
hugo_version: 0.92.0
|
|
||||||
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://ewen.korr.bzh
|
|
||||||
|
|
||||||
- name: deploy
|
|
||||||
image: alpine/git
|
|
||||||
environment:
|
#steps:
|
||||||
SCP_KEY:
|
#- name: prends_des_branches
|
||||||
from_secret: SCP_KEY
|
# image: alpine/git
|
||||||
SCP_HOSTNAME:
|
# commands:
|
||||||
from_secret: SCP_HOSTNAME
|
# - git submodule init
|
||||||
SCP_USER:
|
# - git submodule update --recursive --remote
|
||||||
from_secret: SCP_USER
|
#
|
||||||
SCP_PORT:
|
#- name: construis_ton_nid
|
||||||
from_secret: SCP_PORT
|
# image: plugins/hugo
|
||||||
SCP_COMMAND:
|
# settings:
|
||||||
from_secret: SCP_COMMAND
|
# hugo_version: 0.92.0
|
||||||
commands:
|
# extended: false
|
||||||
- mkdir $HOME/.ssh
|
# validate: true
|
||||||
- echo "$SCP_KEY" > $HOME/.ssh/id_rsa
|
# # config: hugo/config.toml
|
||||||
- ssh-keyscan -t rsa -p $SCP_PORT $SCP_HOSTNAME >> $HOME/.ssh/known_hosts
|
# # content: hugo/content
|
||||||
- chmod -R og-rw $HOME/.ssh/
|
# # layout: hugo/layout
|
||||||
- scp -r -P $SCP_PORT -i $HOME/.ssh/id_rsa public $SCP_USER@$SCP_HOSTNAME:~/
|
# # output: hugo/public
|
||||||
- ssh -p $SCP_PORT -i $HOME/.ssh/id_rsa $SCP_USER@$SCP_HOSTNAME 'rm -rvf /srv/apps/blog/data/www/publcic/*; mv ~/public/* /srv/apps/blog/data/www/public/; docker-compose -f /srv/apps/blog/docker-compose.yml restart; rm -rvf ~/public'
|
# # theme: hugo/themes/hugo-theme-hello-friend-ng/
|
||||||
|
# url: https://ewen.korr.bzh
|
||||||
|
#
|
||||||
|
#- name: deploy
|
||||||
|
# image: alpine/git
|
||||||
|
# environment:
|
||||||
|
# SCP_KEY:
|
||||||
|
# from_secret: SCP_KEY
|
||||||
|
# SCP_HOSTNAME:
|
||||||
|
# from_secret: SCP_HOSTNAME
|
||||||
|
# SCP_USER:
|
||||||
|
# from_secret: SCP_USER
|
||||||
|
# SCP_PORT:
|
||||||
|
# from_secret: SCP_PORT
|
||||||
|
# SCP_COMMAND:
|
||||||
|
# from_secret: SCP_COMMAND
|
||||||
|
# commands:
|
||||||
|
# - mkdir $HOME/.ssh
|
||||||
|
# - echo "$SCP_KEY" > $HOME/.ssh/id_rsa
|
||||||
|
# - ssh-keyscan -t rsa -p $SCP_PORT $SCP_HOSTNAME >> $HOME/.ssh/known_hosts
|
||||||
|
# - chmod -R og-rw $HOME/.ssh/
|
||||||
|
# - scp -r -P $SCP_PORT -i $HOME/.ssh/id_rsa public $SCP_USER@$SCP_HOSTNAME:~/
|
||||||
|
# - ssh -p $SCP_PORT -i $HOME/.ssh/id_rsa $SCP_USER@$SCP_HOSTNAME 'rm -rvf /srv/apps/blog/data/www/publcic/*; mv ~/public/* /srv/apps/blog/data/www/public/; docker-compose -f /srv/apps/blog/docker-compose.yml restart; rm -rvf ~/public'
|
||||||
|
|
Loading…
Reference in a new issue