chore: update CI
This commit is contained in:
parent
cc0a479550
commit
c0b7ed4984
53
.drone.yml
53
.drone.yml
@ -4,35 +4,66 @@ type: docker
|
|||||||
name: CD
|
name: CD
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: restore cache
|
- name: restore cache node
|
||||||
image: drillster/drone-volume-cache
|
image: drillster/drone-volume-cache
|
||||||
volumes:
|
volumes:
|
||||||
- name: cache
|
- name: main-website-node
|
||||||
path: /cache
|
path: /cache/phundrak.com/node
|
||||||
settings:
|
settings:
|
||||||
restore: true
|
restore: true
|
||||||
mount:
|
mount:
|
||||||
- ./node_modules
|
- ./node_modules
|
||||||
|
|
||||||
- name: generate
|
- name: restore cache emacs
|
||||||
|
image: drillster/drone-volume-cache
|
||||||
|
volumes:
|
||||||
|
- name: main-website-emacs
|
||||||
|
path: /cache/phundrak.com/emacs
|
||||||
|
settings:
|
||||||
|
restore: true
|
||||||
|
mount:
|
||||||
|
- /root/.emacs.d
|
||||||
|
|
||||||
|
- name: generate emacs
|
||||||
|
image: silex/emacs:master-alpine
|
||||||
|
commands:
|
||||||
|
- apk update && apk add git
|
||||||
|
- emacs -Q --script export.el
|
||||||
|
depends_on:
|
||||||
|
- "restore cache emacs"
|
||||||
|
|
||||||
|
- name: generate node
|
||||||
image: node:19-alpine
|
image: node:19-alpine
|
||||||
commands:
|
commands:
|
||||||
- yarn install
|
- yarn install
|
||||||
- yarn build
|
- yarn build
|
||||||
depends_on:
|
depends_on:
|
||||||
- "restore cache"
|
- "restore cache node"
|
||||||
|
- "generate emacs"
|
||||||
|
|
||||||
- name: rebuild cache
|
- name: rebuild cache emacs
|
||||||
image: drillster/drone-volume-cache
|
image: drillster/drone-volume-cache
|
||||||
volumes:
|
volumes:
|
||||||
- name: cache
|
- name: conlang-emacs
|
||||||
path: /cache
|
path: /cache/conlang/emacs
|
||||||
|
settings:
|
||||||
|
rebuild: true
|
||||||
|
mount:
|
||||||
|
- /root/.emacs.d
|
||||||
|
depends_on:
|
||||||
|
- "generate emacs"
|
||||||
|
|
||||||
|
- name: rebuild cache node
|
||||||
|
image: drillster/drone-volume-cache
|
||||||
|
volumes:
|
||||||
|
- name: main-website-node
|
||||||
|
path: /cache/phundrak.com/node
|
||||||
settings:
|
settings:
|
||||||
rebuild: true
|
rebuild: true
|
||||||
mount:
|
mount:
|
||||||
- ./node_modules
|
- ./node_modules
|
||||||
depends_on:
|
depends_on:
|
||||||
- generate
|
- "generate node"
|
||||||
|
|
||||||
- name: deploy stable
|
- name: deploy stable
|
||||||
image: appleboy/drone-scp
|
image: appleboy/drone-scp
|
||||||
@ -50,7 +81,7 @@ steps:
|
|||||||
port:
|
port:
|
||||||
from_secret: ssh_port
|
from_secret: ssh_port
|
||||||
depends_on:
|
depends_on:
|
||||||
- generate
|
- "generate node"
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
@ -93,7 +124,7 @@ steps:
|
|||||||
port:
|
port:
|
||||||
from_secret: ssh_port
|
from_secret: ssh_port
|
||||||
depends_on:
|
depends_on:
|
||||||
- generate
|
- "generate node"
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- devel
|
- devel
|
||||||
|
29
export.el
Normal file
29
export.el
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
(require 'package)
|
||||||
|
(require 'org)
|
||||||
|
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
|
||||||
|
(package-initialize)
|
||||||
|
(package-refresh-contents)
|
||||||
|
(package-install 'f)
|
||||||
|
(package-install 'ox-gfm)
|
||||||
|
|
||||||
|
(require 'f)
|
||||||
|
(require 'ox-gfm)
|
||||||
|
(require 'ox-publish)
|
||||||
|
|
||||||
|
(setq org-confirm-babel-evaluate nil
|
||||||
|
org-html-validation-link nil
|
||||||
|
make-backup-files nil
|
||||||
|
org-export-with-broken-links t)
|
||||||
|
|
||||||
|
(defvar project-root
|
||||||
|
(file-name-as-directory (expand-file-name "content" default-directory)))
|
||||||
|
|
||||||
|
(message "Emacs directory: %s" (f-full user-emacs-directory))
|
||||||
|
|
||||||
|
(dolist (file (f-files project-root (lambda (file) (f-ext-p file "org")) t))
|
||||||
|
(message "====== Exporting %s" (f-relative file))
|
||||||
|
(with-temp-buffer
|
||||||
|
(find-file file)
|
||||||
|
(org-export-to-file 'gfm (concat (f-no-ext file) ".md"))))
|
||||||
|
|
||||||
|
(message "Project generated!")
|
Loading…
Reference in New Issue
Block a user