diff options
author | Yann Herklotz <git@yannherklotz.com> | 2022-03-25 12:57:40 +0000 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2022-03-25 12:57:40 +0000 |
commit | ea4ad462e33384c8bbbddca523f138c6c181e7b6 (patch) | |
tree | 3e906e36e1279d8e19793e67e2756c7205ab3519 | |
parent | b25f796221dcb16ce2af8bd139d032cf7b5bdb7d (diff) | |
download | yannherklotz.com-ea4ad462e33384c8bbbddca523f138c6c181e7b6.tar.gz yannherklotz.com-ea4ad462e33384c8bbbddca523f138c6c181e7b6.zip |
Integrate everything into one makefile
-rw-r--r-- | .build.yml | 4 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | .gitlab-ci.yml | 14 | ||||
-rw-r--r-- | Makefile | 31 | ||||
-rw-r--r-- | deps.el | 6 | ||||
-rw-r--r-- | publish.el | 11 |
6 files changed, 33 insertions, 35 deletions
@@ -13,9 +13,7 @@ secrets: tasks: - build: | cd yannherklotz.com - emacs --batch --load deps.el --find-file content.org --load publish.el - make all - hugo --minify + make public - deploy: | cd yannherklotz.com zip -r public.zip public @@ -1,4 +1,6 @@ .DS_Store content/ +public/ +layouts/ *.lock diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 9b6ccfa..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,14 +0,0 @@ -image: ymherklotz/hugo:latest - -variables: - GIT_SUBMODULE_STRATEGY: recursive - -pages: - script: - - emacs --batch --no-init --file content.org --load publish.el - - hugo - artifacts: - paths: - - public - only: - - master @@ -1,4 +1,20 @@ -all: layouts/partials/papers.html layouts/partials/papers_other.html +DEPS := "(progn\ +(require 'package)\ +(package-initialize)\ +(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\") t)\ +(package-refresh-contents)\ +(package-install 'ox-hugo)\ +(require 'package)\ +(package-initialize)\ +(require 'org)\ +(require 'ox)\ +(require 'ox-hugo)\ +(setq org-confirm-babel-evaluate nil\ + org-export-with-broken-links t))" + +PUBLISH := "(org-hugo-export-wim-to-md :all-subtrees)" + +all: public layouts/partials: mkdir -p $@ @@ -13,3 +29,16 @@ layouts/partials/%.html: %.bib | layouts/partials url_artifact artifact $< sed -r -e 's:\[(.*)\]:<b>\1</b>:g' $@ >$@.new && mv $@.new $@ sed -r -e 's:Yann Herklotz:<b>Yann Herklotz</b>:g' $@ >$@.new && mv $@.new $@ + +content: content.org + emacs --batch --eval $(DEPS) --find-file $< --eval $(PUBLISH) + +public: content layouts/partials/papers.html layouts/partials/papers_other.html + hugo --minify + +clean: + rm -rf layouts + rm -rf public + rm -rf content + +.PHONY: all clean diff --git a/deps.el b/deps.el deleted file mode 100644 index 971c4f3..0000000 --- a/deps.el +++ /dev/null @@ -1,6 +0,0 @@ -(require 'package) -(package-initialize) -(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) -(package-refresh-contents) - -(package-install 'ox-hugo) diff --git a/publish.el b/publish.el deleted file mode 100644 index cdc7d35..0000000 --- a/publish.el +++ /dev/null @@ -1,11 +0,0 @@ -(require 'package) -(package-initialize) - -(require 'org) -(require 'ox) -(require 'ox-hugo) - -(setq org-confirm-babel-evaluate nil - org-export-with-broken-links t) - -(org-hugo-export-wim-to-md :all-subtrees) |