another try to get rclone working

This commit is contained in:
Marvin Steadfast 2020-03-05 14:08:48 +01:00
parent 89c8b519ee
commit 1eef94a9df
2 changed files with 15 additions and 4 deletions

View File

@ -6,12 +6,12 @@ steps:
image: golang:1.14.0-alpine3.11
pull: always
environment:
RCLONE_CONF:
from_secret: rclone.conf
FTP_PASS:
from_secret: ftp_pass
commands:
- apk add --no-cache make
- mkdir -p ~/.config/rclone
- echo $RCLONE_CONF > ~/.config/rclone/rclone.conf
- make rclone_config
- cat ~/.config/rclone/rclone.conf
- make install_deps
- make build

View File

@ -1,6 +1,9 @@
HUGO_VERSION=0.65.3
RCLONE_VERSION=1.51.0
OUTPUT_DIR=./public
FTP_HOST=xsteadfastx.org
FTP_TARGET_DIR=/
FTP_USER=xstead_0
clean:
rm -rf public
@ -18,4 +21,12 @@ install_deps:
ftp_upload:
rclone sync $(OUTPUT_DIR) blog://
.PHONY: clean build install_deps ftp_upload
rclone_config:
echo "[blog]" > ~/.config/rclone/rclone.conf
echo "type = sftp" >> ~/.config/rclone/rclone.conf
echo "host = $(FTP_HOST)" >> ~/.config/rclone/rclone.conf
echo "user = $(FTP_USER)" >> ~/.config/rclone/rclone.conf
echo "pass = $(FTP_PASS)" >> ~/.config/rclone/rclone.conf
.PHONY: clean build install_deps ftp_upload rclone_config