From 8586f500cb82e5a6fe91e53333b4a24ce20a1733 Mon Sep 17 00:00:00 2001 From: selankon Date: Mon, 8 Jul 2024 17:00:16 +0200 Subject: [PATCH] Add action --- .gitlab-ci.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..27ef8f5 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,34 @@ +image: registry.gitlab.com/pages/hugo:latest + +variables: + GIT_SUBMODULE_STRATEGY: recursive + WEBDAV_REMOTE_PATH: html-es.hackmeeting.org + WEBDAV_USERNAME: es_hackmeeting + WEBDAV_URL: https://www.autistici.org/dav/es_hackmeeting + DEST_DIRECTORY: hugo + +stages: + - build + - push + +before_script: + - hugo version + +build: + stage: build + script: + - hugo -D + artifacts: + paths: + - public + +push: + stage: push + image: + name: rclone/rclone:latest + entrypoint: [""] + script: + - "rclone sync -v --retries 10 --exclude='hm/**' --webdav-url ${WEBDAV_URL} --webdav-user ${WEBDAV_USERNAME} --webdav-pass $(echo -n \"${WEBDAV_PASSWORD}\" | rclone obscure -) ./public :webdav:${WEBDAV_REMOTE_PATH}/${DEST_DIRECTORY}" + + only: + - no-masters