Fix CI
This commit is contained in:
parent
f896fc176b
commit
399a138a84
|
@ -10,39 +10,32 @@ variables:
|
||||||
DEST_DIRECTORY: latest/hugo
|
DEST_DIRECTORY: latest/hugo
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
|
||||||
- build
|
- build
|
||||||
- push
|
- push
|
||||||
|
|
||||||
test:
|
build:
|
||||||
stage: test
|
|
||||||
before_script:
|
before_script:
|
||||||
- apk add --no-cache go curl bash nodejs
|
- apk add --no-cache go curl bash nodejs
|
||||||
- hugo version
|
- hugo version
|
||||||
- hugo mod get -u
|
- hugo mod get -u
|
||||||
script:
|
|
||||||
- hugo
|
|
||||||
rules:
|
|
||||||
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
|
|
||||||
|
|
||||||
build:
|
|
||||||
before_script:
|
|
||||||
- hugo version
|
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- 'hugo --baseURL="https://es.hackmeeting.org/${DEST_DIRECTORY}"'
|
- 'hugo --baseURL="https://es.hackmeeting.org/${DEST_DIRECTORY}"'
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH == 'no-masters'
|
||||||
|
|
||||||
push:
|
push:
|
||||||
stage: push
|
stage: push
|
||||||
image:
|
image:
|
||||||
name: rclone/rclone:latest
|
name: rclone/rclone:latest
|
||||||
entrypoint: [""]
|
entrypoint: [""]
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_BRANCH == 'no-masters'
|
||||||
|
- if: $WEBDAV_PASSWORD
|
||||||
script:
|
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}"
|
- "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:
|
dependencies:
|
||||||
- build
|
- build
|
||||||
only:
|
|
||||||
- no-masters
|
|
||||||
|
|
Loading…
Reference in New Issue