35 lines
892 B
YAML
35 lines
892 B
YAML
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: latest/hugo
|
|
|
|
stages:
|
|
- build
|
|
- push
|
|
|
|
build:
|
|
before_script:
|
|
- hugo version
|
|
stage: build
|
|
script:
|
|
- cp custom.html themes/blowfish/layouts/partials/home/custom.html
|
|
- hugo --baseURL="https://es.hackmeeting.org/${DEST_DIRECTORY}"
|
|
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
|