Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
ahmadbilalkhalid | 479e874d88 |
|
@ -1,4 +0,0 @@
|
||||||
venv/
|
|
||||||
.DS_Store
|
|
||||||
.idea/
|
|
||||||
.history
|
|
|
@ -1,33 +0,0 @@
|
||||||
stages:
|
|
||||||
- build
|
|
||||||
- deploy
|
|
||||||
|
|
||||||
image: code.ungleich.ch:5050/ungleich-public/ungleich-staticcms:latest
|
|
||||||
variables:
|
|
||||||
BUILDDIR: "build/"
|
|
||||||
|
|
||||||
build:
|
|
||||||
stage: build
|
|
||||||
script:
|
|
||||||
- make build
|
|
||||||
artifacts:
|
|
||||||
expire_in: 12 hours
|
|
||||||
paths:
|
|
||||||
- "build/"
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
stage: deploy
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
environment:
|
|
||||||
name: production
|
|
||||||
url: https://ungleich.ch/
|
|
||||||
before_script:
|
|
||||||
# Configure the SSH Agent
|
|
||||||
- eval $(ssh-agent -s)
|
|
||||||
- echo "$CD_SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
|
|
||||||
- mkdir -p ~/.ssh
|
|
||||||
- echo "$CD_SSH_SERVER_HOSTKEYS" > ~/.ssh/known_hosts
|
|
||||||
- chmod 644 ~/.ssh/known_hosts
|
|
||||||
script:
|
|
||||||
- make deploy
|
|
14
Dockerfile
|
@ -1,14 +0,0 @@
|
||||||
# This image used for CI.
|
|
||||||
|
|
||||||
FROM alpine:3.15
|
|
||||||
MAINTAINER ungleich <foss@ungleich.ch>
|
|
||||||
|
|
||||||
RUN pip install lektor
|
|
||||||
RUN mkdir /build /data
|
|
||||||
COPY . /data
|
|
||||||
|
|
||||||
FROM nginx:
|
|
||||||
|
|
||||||
RUN apt-get update
|
|
||||||
RUN apt-get install -y make python3-pip imagemagick openssh-client rsync git
|
|
||||||
RUN pip3 install git+https://github.com/lektor/lektor/
|
|
|
@ -1,8 +0,0 @@
|
||||||
# This image used for CI.
|
|
||||||
|
|
||||||
FROM debian:latest
|
|
||||||
MAINTAINER Timothée Floure <timothee.floure@ungleich.ch>
|
|
||||||
|
|
||||||
RUN apt-get update
|
|
||||||
RUN apt-get install -y make python3-pip imagemagick openssh-client rsync git
|
|
||||||
RUN pip3 install git+https://github.com/lektor/lektor/
|
|
29
Makefile
|
@ -1,33 +1,20 @@
|
||||||
BUILDDIR?=../ungleich-staticcms-build
|
BUILDDIR=ungleich-staticcms-build
|
||||||
DESTINATION=ungleichstatic@staticweb.ungleich.ch:/home/services/www/ungleichstatic/staticcms.ungleich.ch/www/u/
|
DESTINATION=ungleichstatic@staticweb.ungleich.ch:/home/services/www/ungleichstatic/staticcms.ungleich.ch/www/
|
||||||
|
|
||||||
all: goodpush
|
all: publish
|
||||||
|
|
||||||
pull:
|
pull:
|
||||||
git pull
|
git pull
|
||||||
|
|
||||||
push:
|
publish: pull build permissions
|
||||||
git push
|
rsync -av --exclude .lektor/ $(BUILDDIR)/ $(DESTINATION)
|
||||||
|
|
||||||
goodpush:
|
|
||||||
make publish && make push
|
|
||||||
|
|
||||||
publish: pull build deploy
|
|
||||||
|
|
||||||
deploy: permissions
|
|
||||||
rsync -av --delete --exclude .lektor/ $(BUILDDIR)/u/ $(DESTINATION)
|
|
||||||
rsync -av --delete $(BUILDDIR)/sitemap.xml $(DESTINATION)
|
|
||||||
|
|
||||||
permissions: build
|
permissions: build
|
||||||
find $(BUILDDIR) -type f -exec chmod 0644 {} \;
|
find $(BUILDDIR) -type f -exec chmod 0644 {} \;
|
||||||
find $(BUILDDIR) -type d -exec chmod 0755 {} \;
|
find $(BUILDDIR) -type d -exec chmod 0755 {} \;
|
||||||
|
|
||||||
build: venv
|
build:
|
||||||
. ./venv/bin/activate && lektor build -O $(BUILDDIR)
|
lektor build -O $(BUILDDIR)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(BUILDDIR)
|
rm -rf $(BUILDDIR)
|
||||||
|
|
||||||
venv: requirements.txt
|
|
||||||
python3 -m venv venv
|
|
||||||
sh -c ". ./venv/bin/activate && pip install -r requirements.txt"
|
|
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 155 KiB |
Before Width: | Height: | Size: 258 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 291 KiB |
Before Width: | Height: | Size: 139 KiB |
Before Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 135 KiB |
Before Width: | Height: | Size: 144 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 232 KiB |
Before Width: | Height: | Size: 237 KiB |
Before Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 302 KiB |
Before Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 115 KiB |
Before Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 310 KiB |
Before Width: | Height: | Size: 214 KiB |
Before Width: | Height: | Size: 261 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 209 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 212 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 115 KiB |
Before Width: | Height: | Size: 123 KiB |
Before Width: | Height: | Size: 402 KiB |
Before Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 335 KiB |
Before Width: | Height: | Size: 282 KiB |
Before Width: | Height: | Size: 356 KiB |
Before Width: | Height: | Size: 143 KiB |
Before Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 91 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 264 KiB |
Before Width: | Height: | Size: 136 KiB |
Before Width: | Height: | Size: 201 KiB |
Before Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 275 KiB |
Before Width: | Height: | Size: 253 KiB |
Before Width: | Height: | Size: 142 KiB |
Before Width: | Height: | Size: 73 KiB |