Config CI: Include misc/splash-images in publish

This commit is contained in:
TEC 2021-03-26 18:31:15 +08:00
parent 456d9165eb
commit 07c86da012
Signed by: tec
GPG Key ID: 779591AFDB81F06C
2 changed files with 9 additions and 8 deletions

View File

@ -104,16 +104,17 @@
(defun publish (&rest files)
"Move each file into `publish'.
Names containing \"*\" are treate as a glob."
Names containing \"*\" are treated as a glob."
(dolist (file files)
(if (string-match-p "\\*" file)
(apply #'publish
(directory-files (expand-file-name (or (file-name-directory file) "./") config-root)
t
(dired-glob-regexp (file-name-nondirectory file))))
(message (concat (when message-colour "[34] ") "Publishing %s") file)
(let ((target (replace-regexp-in-string (regexp-quote config-root)
publish-dir
(expand-file-name file config-root))))
(ensure-dir-exists target)
(copy-file (expand-file-name file config-root) target t)))))
(unless (string-match-p "/\\.\\.?$" file)
(message (concat (when message-colour "[34] ") "Publishing %s") file)
(let ((target (replace-regexp-in-string (regexp-quote config-root)
publish-dir
(expand-file-name file config-root))))
(ensure-dir-exists target)
(copy-file (expand-file-name file config-root) target t))))))

View File

@ -27,7 +27,7 @@
(org-mode)
(org-html-export-to-html)))
(publish "config.html" "misc/*.svg")
(publish "config.html" "misc/*.svg" "misc/splash-images/*")
(make-symbolic-link (expand-file-name "config.html" publish-dir)
(expand-file-name "index.html" publish-dir) t)