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

View File

@ -27,7 +27,7 @@
(org-mode) (org-mode)
(org-html-export-to-html))) (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) (make-symbolic-link (expand-file-name "config.html" publish-dir)
(expand-file-name "index.html" publish-dir) t) (expand-file-name "index.html" publish-dir) t)