ccchh-website/.gitlab-ci.yml
jtbx (Jannik) f826bcf7fe CI: Set timezone to Europe/Berlin
Evaluation of the ical data uses the local time when formating the output string as the input data uses UTC.
2023-11-04 19:43:29 +00:00

38 lines
951 B
YAML

variables:
TZ: Europe/Berlin
stages:
- build
- deploy
build-website:
stage: build
image: alpine
before_script:
- apk update
- apk add tzdata hugo coreutils curl jq git
script:
- ./fetch-calendar.sh
- sed -i "s#baseURL = 'https://hamburg.ccc.de/'#baseURL = 'https://next.hamburg.ccc.de/'#" hugo.toml
- hugo
artifacts:
expose_as: "website build"
name: "website-build-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA"
paths:
- public/
expire_in: 1 month
deploy-website:
stage: deploy
image: alpine
before_script:
- apk update
- apk add rsync openssh
script:
- chmod 400 $NEXT_SSH_DEPLOY_KEY
- rsync -r --delete -e "ssh -i $NEXT_SSH_DEPLOY_KEY -o 'UserKnownHostsFile $SSH_KNOWN_HOSTS_FILE'" public/ ccchh-website-deploy@public-web-static-intern.hamburg.ccc.de:/var/www/next.hamburg.ccc.de/
rules:
- if: $CI_COMMIT_BRANCH == "main"
when: on_success
- when: never