brainsteam.co.uk/.drone.yml

42 lines
1.0 KiB
YAML
Raw Normal View History

2020-12-28 11:54:51 +00:00
kind: pipeline
name: update_website
2020-12-28 13:24:52 +00:00
steps:
2020-12-28 13:22:03 +00:00
- name: hugo_build
2020-12-28 11:54:51 +00:00
image: alombarte/hugo
when:
branch:
- main
2020-12-28 11:54:51 +00:00
commands:
2020-12-28 11:56:31 +00:00
- git submodule init
2020-12-28 11:57:19 +00:00
- git submodule update
2020-12-28 11:55:42 +00:00
- cd brainsteam
2020-12-28 12:09:39 +00:00
- hugo
2021-12-21 12:45:29 +00:00
- pwd
2021-12-21 12:43:34 +00:00
- cd ../
2021-12-21 12:44:51 +00:00
- git fetch public && git checkout public
2021-12-21 12:43:34 +00:00
- cd ../ && mv brainsteam/public/* .
- rm -rf brainsteam/
2020-12-28 13:22:03 +00:00
- name: hugo_publish
2021-12-21 12:21:34 +00:00
#image: alpine:3.12.3
image: appleboy/drone-git-push
settings:
remote_name: origin
2021-12-21 12:43:34 +00:00
branch: public
local_ref: public
2021-12-21 12:21:34 +00:00
commit: true
commit_message: update build from hugo
author_name: DroneCI
# when:
# branch:
# - main
# environment:
# FTP_USERNAME:
# from_secret: FTP_USERNAME
# FTP_PASSWORD:
# from_secret: FTP_PASSWORD
# FTP_HOSTNAME: sv7.byethost7.org
# commands:
# - apk add lftp
# - cd brainsteam
# - lftp -e "mirror -R ./public /" -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOSTNAME