Add Drone CI config, remove Gitlab CI config, change link to hugo-tango-theme
This commit is contained in:
parent
bd327ad951
commit
6bf871c0c4
35
.drone.yml
Normal file
35
.drone.yml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: publish
|
||||||
|
|
||||||
|
steps:
|
||||||
|
steps:
|
||||||
|
- name: fetch_submodules
|
||||||
|
image: alpine/git
|
||||||
|
commands:
|
||||||
|
- ls -lah themes/tango
|
||||||
|
- git submodule update --init
|
||||||
|
- ls -lah themes/tango
|
||||||
|
- name: build
|
||||||
|
image: fat0troll/hugo
|
||||||
|
commands:
|
||||||
|
- hugo -d tango.hodakov.me
|
||||||
|
- name: publish
|
||||||
|
image: appleboy/drone-scp
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
from_secret: web_host
|
||||||
|
username:
|
||||||
|
from_secret: ssh_user
|
||||||
|
password:
|
||||||
|
from_secret: ssh_password
|
||||||
|
target:
|
||||||
|
from_secret: web_target
|
||||||
|
rm: true
|
||||||
|
strip_components: 1
|
||||||
|
source:
|
||||||
|
- tango.hodakov.me/*
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
@ -1,29 +0,0 @@
|
|||||||
image: lab.wtfteam.pro:4567/containers/hugo:latest
|
|
||||||
|
|
||||||
variables:
|
|
||||||
GIT_SUBMODULE_STRATEGY: recursive
|
|
||||||
|
|
||||||
build site:
|
|
||||||
stage: build
|
|
||||||
script:
|
|
||||||
- hugo -d tango.hodakov.me
|
|
||||||
artifacts:
|
|
||||||
untracked: true
|
|
||||||
expire_in: 4 hours
|
|
||||||
paths:
|
|
||||||
- tango.hodakov.me
|
|
||||||
|
|
||||||
deploy site:
|
|
||||||
stage: deploy
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
before_script:
|
|
||||||
- apk add --no-cache openssh-client
|
|
||||||
- mkdir -p ~/.ssh
|
|
||||||
- echo "$DEPLOY_KEY" | tr -d '\r' > ~/.ssh/id_rsa
|
|
||||||
- chmod 600 ~/.ssh/id_rsa
|
|
||||||
- eval "$(ssh-agent -s)"
|
|
||||||
- ssh-add ~/.ssh/id_rsa
|
|
||||||
- ssh-keyscan -H $DEPLOY_HOST >> ~/.ssh/known_hosts
|
|
||||||
script:
|
|
||||||
- scp -r tango.hodakov.me $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH
|
|
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -1,3 +1,3 @@
|
|||||||
[submodule "themes/tango"]
|
[submodule "themes/tango"]
|
||||||
path = themes/tango
|
path = themes/tango
|
||||||
url = ../hugo-tango-theme.git
|
url = https://source.hodakov.me/fat0troll/hugo-tango-theme.git
|
||||||
|
Loading…
Reference in New Issue
Block a user