aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2022-03-25 12:57:40 +0000
committerYann Herklotz <git@yannherklotz.com>2022-03-25 12:57:40 +0000
commitea4ad462e33384c8bbbddca523f138c6c181e7b6 (patch)
tree3e906e36e1279d8e19793e67e2756c7205ab3519
parentb25f796221dcb16ce2af8bd139d032cf7b5bdb7d (diff)
downloadyannherklotz.com-ea4ad462e33384c8bbbddca523f138c6c181e7b6.tar.gz
yannherklotz.com-ea4ad462e33384c8bbbddca523f138c6c181e7b6.zip
Integrate everything into one makefile
-rw-r--r--.build.yml4
-rw-r--r--.gitignore2
-rw-r--r--.gitlab-ci.yml14
-rw-r--r--Makefile31
-rw-r--r--deps.el6
-rw-r--r--publish.el11
6 files changed, 33 insertions, 35 deletions
diff --git a/.build.yml b/.build.yml
index 8c1843a..12e02b9 100644
--- a/.build.yml
+++ b/.build.yml
@@ -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
diff --git a/.gitignore b/.gitignore
index 201eed2..fe64e7b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/Makefile b/Makefile
index eacef92..10df2ae 100644
--- a/Makefile
+++ b/Makefile
@@ -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)