Enabled GitLab CI pipeline for publishing
This commit is contained in:
parent
df09e9d369
commit
16d59ee985
2 changed files with 22 additions and 2 deletions
20
.gitlab-ci.yml
Normal file
20
.gitlab-ci.yml
Normal 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
|
|
@ -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
|
(setq mmk2410/dot-emacs-publish-html-head-extra
|
||||||
(concat "<link rel=\"stylesheet\" href=\"normalize.css\">\n"
|
(concat "<link rel=\"stylesheet\" href=\"normalize.css\">\n"
|
||||||
"<link rel=\"stylesheet\" href=\"layout.css\">\n"
|
"<link rel=\"stylesheet\" href=\"layout.css\">\n"
|
||||||
"<link rel=\"stylesheet\" href=\"code.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>"))
|
"<script defer data-domain=\"config.mmk2410.org\" src=\"https://stats.mmk2410.org/js/plausible.js\"></script>"))
|
||||||
|
|
||||||
(setq mmk2410/dot-emacs-publish-html-preamble
|
(setq mmk2410/dot-emacs-publish-html-preamble
|
||||||
|
|
Loading…
Reference in a new issue