diff --git a/.drone.yml b/.drone.yml index fd3c43e..6de71c3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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 diff --git a/Makefile b/Makefile index a1bc0c3..9089ac7 100644 --- a/Makefile +++ b/Makefile @@ -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