1

Add Drone CI config, remove Gitlab CI config, change link to hugo-tango-theme

This commit is contained in:
Vladimir Hodakov 2019-10-07 09:13:13 +04:00
parent bd327ad951
commit 6bf871c0c4
Signed by: Vladimir Hodakov
GPG Key ID: 673980B6882F82C6
3 changed files with 36 additions and 30 deletions

35
.drone.yml Normal file
View 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

View File

@ -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
View File

@ -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