scim-docs/.gitlab-ci.yml

47 lines
1.2 KiB
YAML
Raw Normal View History

2024-08-29 10:10:19 +00:00
image: alpine:latest
variables:
HUGO_VERSION: 0.79.0
2024-09-05 10:04:32 +00:00
FOLDER: "public"
OBJECT_STORE_ENDPOINT: "hot-objects.liiib.re"
2024-09-04 09:30:21 +00:00
BUCKET: libre-sh-scim-doc
BETA_BUCKET: libre-sh-scim-doc-beta
2024-08-29 10:10:19 +00:00
stages:
2024-09-05 10:04:32 +00:00
- build
- deploy
2024-08-29 10:10:19 +00:00
2024-09-05 10:04:32 +00:00
workflow:
rules:
- if: "$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH"
variables:
MC_HOST_hot: https://${AWS_ACCESS_KEY_ID}:${AWS_SECRET_ACCESS_KEY}@${OBJECT_STORE_ENDPOINT}
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
variables:
MC_HOST_hot: https://${BETA_AWS_ACCESS_KEY_ID}:${BETA_AWS_SECRET_ACCESS_KEY}@${OBJECT_STORE_ENDPOINT}
BUCKET: ${BETA_BUCKET}
2024-08-29 10:10:19 +00:00
build:
stage: build
2024-09-05 10:04:32 +00:00
before_script:
- apk add --no-cache wget ca-certificates
- wget -O hugo.tar.gz https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz
- tar xzf hugo.tar.gz hugo
- apk add --no-cache nodejs-current npm
script: ./hugo --minify
2024-08-29 10:10:19 +00:00
artifacts:
paths:
2024-09-05 10:04:32 +00:00
- public
2024-08-29 10:10:19 +00:00
2024-09-05 10:04:32 +00:00
deploy:
stage: deploy
rules:
- if: "$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH"
when: on_success
- when: manual
needs: ["build"]
image:
name: minio/mc
entrypoint: [""]
script: mc mirror --overwrite --remove ${FOLDER} hot/${BUCKET}