From 399a138a84308083a9e2c210042ca92044a91a95 Mon Sep 17 00:00:00 2001 From: logout hacklab Date: Tue, 13 Aug 2024 15:11:24 +0000 Subject: [PATCH] Fix CI --- .gitlab-ci.yml | 19 ++++++------------- go.mod | 2 +- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ea2e66c..71de0e3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,39 +10,32 @@ variables: DEST_DIRECTORY: latest/hugo stages: - - test - build - push -test: - stage: test +build: before_script: - apk add --no-cache go curl bash nodejs - hugo version - hugo mod get -u - script: - - hugo - rules: - - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH - -build: - before_script: - - hugo version stage: build script: - 'hugo --baseURL="https://es.hackmeeting.org/${DEST_DIRECTORY}"' artifacts: paths: - public + rules: + - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH == 'no-masters' push: stage: push image: name: rclone/rclone:latest entrypoint: [""] + rules: + - if: $CI_COMMIT_BRANCH == 'no-masters' + - if: $WEBDAV_PASSWORD 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}" dependencies: - build - only: - - no-masters diff --git a/go.mod b/go.mod index ad56f54..fa81b04 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,5 @@ module 0xacab.org/nutria/wiki-hackmeeting -go 1.22 +go 1.21 require github.com/nunocoracao/blowfish/v2 v2.74.0 // indirect