wiki-hackmeeting/.gitlab-ci.yml

49 lines
1.2 KiB
YAML
Raw Normal View History

2024-08-07 13:57:45 +02:00
default:
image: "${CI_TEMPLATE_REGISTRY_HOST}/pages/hugo/hugo_extended:latest"
2024-07-08 17:00:16 +02:00
variables:
GIT_SUBMODULE_STRATEGY: recursive
2024-08-07 13:57:45 +02:00
HUGO_ENV: production
2024-07-08 17:00:16 +02:00
WEBDAV_REMOTE_PATH: html-es.hackmeeting.org
WEBDAV_USERNAME: es_hackmeeting
WEBDAV_URL: https://www.autistici.org/dav/es_hackmeeting
2024-07-09 15:09:08 +02:00
DEST_DIRECTORY: latest/hugo
2024-07-08 17:00:16 +02:00
stages:
2024-08-07 13:53:59 +02:00
- test
2024-07-08 17:00:16 +02:00
- build
- push
2024-08-07 13:53:59 +02:00
test:
2024-08-07 14:10:08 +02:00
before_script:
- apk add --no-cache go curl bash nodejs
- hugo version
- hugo mod get -u
2024-08-07 13:53:59 +02:00
script:
- hugo
rules:
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
2024-07-08 17:00:16 +02:00
build:
2024-07-09 15:22:23 +02:00
before_script:
- hugo version
2024-07-08 17:00:16 +02:00
stage: build
script:
2024-07-09 15:38:41 +02:00
- 'cp custom.html themes/blowfish/layouts/partials/home/custom.html'
- 'hugo --baseURL="https://es.hackmeeting.org/${DEST_DIRECTORY}"'
2024-07-08 17:00:16 +02:00
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}"
2024-07-09 15:38:41 +02:00
dependencies:
- build
2024-07-08 17:00:16 +02:00
only:
- no-masters