www/.gitlab-ci.yml

58 lines
1 KiB
YAML
Raw Normal View History

2018-08-15 00:49:40 +02:00
stages:
- pages
- calendar
- deploy
cache:
paths:
- ~/.cache/pip/
- public/
2018-08-15 00:49:40 +02:00
variables:
GIT_SUBMODULE_STRATEGY: recursive
build_pages:
image: "golang:1.10-alpine3.8"
2018-08-15 00:50:57 +02:00
stage: pages
2018-08-15 00:49:40 +02:00
variables:
SHELL: "/bin/sh"
2018-08-16 22:09:39 +02:00
artifacts:
untracked: true
2018-08-15 00:49:40 +02:00
script:
- apk add --no-cache --upgrade hugo
- hugo
build_calendar:
image: "python:3.7-alpine3.8"
stage: calendar
2018-08-16 22:09:39 +02:00
dependencies:
- pages
artifacts:
untracked: true
2018-08-15 00:49:40 +02:00
variables:
SHELL: "/bin/sh"
script:
- apk --no-cache update
- pip install -r requirements.txt
- python tools/merge_cals.py
- upcoming="$(python tools/gen_upcoming.py static/all.ics 14 5|tr '\n' ' ')" && sed -i "s#CALENDAR#$upcoming#g" public/index.html
deploy_staging:
image: "alpine:3.8"
stage: deploy
2018-08-16 22:09:39 +02:00
dependencies:
- calendar
2018-08-15 00:49:40 +02:00
variables:
SHELL: "/bin/sh"
script:
- echo "deploy all the things..."
2018-08-16 22:09:39 +02:00
- ls -la public/
2018-08-15 00:49:40 +02:00
when: on_success
environment:
name: staging
url: https://staging.berlin.ccc.de/
artifacts:
paths:
- public/