Skip to content
Snippets Groups Projects
Commit a00dcfa3 authored by logout hacklab's avatar logout hacklab
Browse files

Fix run push only when variables are set

parent f896fc17
No related branches found
No related tags found
1 merge request!1Fix CI
Pipeline #234216 passed
......@@ -10,20 +10,20 @@ variables:
DEST_DIRECTORY: latest/hugo
stages:
- push
- test
- build
- push
test:
stage: test
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
#test:
# stage: test
# 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:
......@@ -40,9 +40,11 @@ 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
- echo "test"
# - "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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment