Enabled GitLab CI pipeline for publishing

This commit is contained in:
Marcel Kapfer 2022-02-15 19:42:12 +01:00
parent df09e9d369
commit 16d59ee985
Signed by: mmk2410
GPG Key ID: CADE6F0C09F21B09
2 changed files with 22 additions and 2 deletions

20
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,20 @@
before_script:
- apk add --no-cache openssh tzdata
- cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_KNOWN_HOSTS" | tr -d '\r' >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
build:
image: silex/emacs:27.2-alpine-ci
stage: build
script:
- emacs -Q --script publish/publish.el
- apk add --no-cache rsync
- rsync --archive --verbose --chown=gitlab-ci:www-data --delete --progress -e"ssh -p "$SSH_PORT"" public/ "$SSH_USER"@mmk2410.org:/var/www/config.mmk2410.org/
artifacts:
paths:
- public

View File

@ -1,10 +1,10 @@
(setq mmk2410/dot-emacs-publish-publishing-dir "/tmp/dot-emacs-publish/")
(setq mmk2410/dot-emacs-publish-publishing-dir "./public/")
(setq mmk2410/dot-emacs-publish-html-head-extra
(concat "<link rel=\"stylesheet\" href=\"normalize.css\">\n"
"<link rel=\"stylesheet\" href=\"layout.css\">\n"
"<link rel=\"stylesheet\" href=\"code.css\">\n"
"<link rel=\"stylesheet\" href=\"font.css\">"
"<link rel=\"stylesheet\" href=\"fonts.css\">"
"<script defer data-domain=\"config.mmk2410.org\" src=\"https://stats.mmk2410.org/js/plausible.js\"></script>"))
(setq mmk2410/dot-emacs-publish-html-preamble