Commit 43c57177 authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼
Browse files

added GitLab CI config

parent 729f68d5
Pipeline #14991 passed with stages
stages:
- build
- deploy
# Stage: build
##############################################################################
build:
stage: build
artifacts:
paths:
- build
script:
- make build
tags:
- docker
image: jekyll/jekyll:builder
# Stage: deploy
##############################################################################
upload:
stage: deploy
script:
- make deploy
dependencies:
- build
tags:
- shell
\ No newline at end of file
#DEPLOY_USER ?= fine-aachenadmin
#DEPLOY_PASS ?= $(shell pass rwth/acs/fein-webspace)
#DEPLOY_URL ?= https://web-upload.rwth-aachen.de/fine-aachen/new/
DEPLOY_USER ?= acs
DEPLOY_HOST ?= villas.fein-aachen.org
DEPLOY_PATH ?= /var/www/villas/website/
SRCDIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
BUILDDIR ?= $(SRCDIR)/build
RSYNC_OPTS ?= --archive --delete --verbose --progress --ignore-missing-args --copy-links --chown $(DEPLOY_USER):$(DEPLOY_USER)
DAVIX_OPTS ?= -r10 --userlogin $(DEPLOY_USER) --userpass $(DEPLOY_PASS)
JEKYLL_OPTS ?= -s $(SRCDIR) -d $(BUILDDIR)
build: build:
jekyll build jekyll build $(JEKYLL_OPTS)
deploy: deploy-rsync
deploy-rsync:
rsync $(RSYNC_OPTS) $(BUILDDIR) $(DEPLOY_USER)@$(DEPLOY_HOST):$(DEPLOY_PATH)
deploy: build deploy-webdav:
rsync -a --delete _site/ root@villas.fein-aachen.org:/var/www/villas/website/ # Davix returns 255 for some reason...
davix-put $(DAVIX_OPTS) $(BUILDDIR)/ $(DEPLOY_URL) || true
.PHONY: build deploy .PHONY: build deploy deploy-rsync deploy-webdav
\ No newline at end of file \ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment