summaryrefslogtreecommitdiffstats
path: root/roles/publish
diff options
context:
space:
mode:
Diffstat (limited to 'roles/publish')
-rw-r--r--roles/publish/tasks/emacs.yml7
-rw-r--r--roles/publish/tasks/main.yml31
-rw-r--r--roles/publish/templates/emacsconf-config.el22
3 files changed, 36 insertions, 24 deletions
diff --git a/roles/publish/tasks/emacs.yml b/roles/publish/tasks/emacs.yml
index 8d75979..3944876 100644
--- a/roles/publish/tasks/emacs.yml
+++ b/roles/publish/tasks/emacs.yml
@@ -11,6 +11,11 @@
- automake
- texinfo
state: present
+- name: Install building dependencies
+ apt:
+ name:
+ - emacs
+ state: build-dep
- name: Create directory
file:
path: "{{ emacs_build_parent }}"
@@ -22,7 +27,7 @@
dest: "{{ emacs_build_parent }}"
creates: "{{ emacs_build_dir }}"
- name: Configure
- command: ./configure --with-x-toolkit=no
+ command: ./configure
args:
chdir: "{{ emacs_build_dir }}"
creates: '{{ emacs_build_dir }}/Makefile'
diff --git a/roles/publish/tasks/main.yml b/roles/publish/tasks/main.yml
index 128b0fa..c09cae2 100644
--- a/roles/publish/tasks/main.yml
+++ b/roles/publish/tasks/main.yml
@@ -54,28 +54,30 @@
owner: "{{ emacsconf_user }}"
group: "{{ emacsconf_group }}"
create: yes
-- name: Set up compile-media
- become_user: "{{ emacsconf_user }}"
- git:
- repo: https://github.com/sachac/compile-media.git
- dest: "~{{ emacsconf_user }}/compile-media"
- name: Set up or update repositories
become_user: "{{ emacsconf_user }}"
- tags: publish
+ tags: publish, wip
block:
+ - name: Set up compile-media
+ git:
+ repo: https://github.com/sachac/compile-media.git
+ dest: "~{{ emacsconf_user }}/compile-media"
+ - name: Set up subed
+ git:
+ repo: https://github.com/sachac/subed.git
+ dest: "~{{ emacsconf_user }}/subed"
- name: Check out wiki repository
ansible.builtin.git:
- repo: anon@git.emacsconf.org:/emacsconf-wiki
+ repo: anon@git.emacsconf.org:emacsconf-wiki
dest: "{{ emacsconf_edit_wiki_dir }}"
- ssh_opts: "-i ~/.ssh/id_rsa_anon_git_emacsconf -u anon"
- key_file: "~{{ emacsconf_user }}/.ssh/id_rsa_anon_git_emacsconf"
+ ssh_opts: "-i /home/{{ emacsconf_user }}/.ssh/id_rsa_anon_git_emacsconf"
register: wiki_clone
failed_when:
- wiki_clone.failed
- not 'Local modifications exist in repository' in wiki_clone.msg
- not 'Failed to checkout branch' in wiki_clone.msg
- - name: Configure git to use
- shell: git config core.sshCommand "ssh -i ~{{ emacsconf_user }}/.ssh/id_rsa_anon_git_emacsconf -F /dev/null"
+ - name: Set up key
+ shell: git config core.sshCommand "ssh -i ~/.ssh/id_rsa_anon_git_emacsconf -F /dev/null"
args:
chdir: "{{ emacsconf_edit_wiki_dir }}"
- name: Check out emacsconf-el
@@ -103,6 +105,7 @@
file:
path: "{{ item }}"
owner: "{{ emacsconf_user }}"
+ group: "{{ emacsconf_group }}"
recurse: true
loop:
- "{{ emacs_config_dir }}"
@@ -119,8 +122,8 @@
tags: publish-talk
command: emacs -l "{{ emacs_config_dir }}/emacsconf-config.el" --batch --exec '(emacsconf-with-talk-heading "{{ slug }}" (emacsconf-update-talk))'
when: slug is defined
- - name: Commit the wiki and push
- shell: cd {{ emacsconf_edit_wiki_dir }}; git commit -m 'Update from ansible' -a; git push
+ # - name: Commit the wiki and push
+ # shell: cd {{ emacsconf_edit_wiki_dir }}; git commit -m 'Update from ansible' -a; git push
- name: Publish the backstage index
- command: emacs -l "{{ emacs_config_dir }}/emacsconf-config.el" --batch --exec '(emacsconf-publish-backstage-index)'
+ command: emacsclient -c -nw --exec '(emacsconf-publish-backstage-index)' -a emacs
when: (publish|d("")) == "backstage"
diff --git a/roles/publish/templates/emacsconf-config.el b/roles/publish/templates/emacsconf-config.el
index 36ca8a2..fbd9ae7 100644
--- a/roles/publish/templates/emacsconf-config.el
+++ b/roles/publish/templates/emacsconf-config.el
@@ -20,27 +20,31 @@
(setq emacsconf-backstage-dir "/ssh:orga@media.emacsconf.org:/var/www/media.emacsconf.org/2022/backstage")
(setq emacsconf-upload-dir "/ssh:orga@media.emacsconf.org:/srv/upload")
+
{% if ansible_host == "res.emacsconf.org" %}
-(setq emacsconf-res-dir (format "/ssh:orga@res.emacsconf.org:/data/emacsconf/%s" emacsconf-year))
+(setq emacsconf-res-dir "/data/{{ emacsconf_id }}/{{ emacsconf_year}}")
(setq emacsconf-cache-dir "/data/{{ emacsconf_id }}/cache")
(setq emacsconf-stream-host "localhost")
+(setq emacsconf-stream-overlay-dir "/data/emacsconf/overlays")
+(setq emacsconf-stream-asset-dir "/data/emacsconf/assets")
{% else %}
-(setq emacsconf-res-dir "/data/{{ emacsconf_id }}/{{ emacsconf_year}}")
+(setq emacsconf-res-dir (format "/ssh:orga@res.emacsconf.org:/data/emacsconf/%s" emacsconf-year))
{% endif %}
+
(add-to-list 'load-path "~/compile-media")
+(add-to-list 'load-path "~/subed/subed")
(require 'compile-media)
(require 'emacsconf)
(require 'emacsconf-publish)
(require 'emacsconf-schedule)
(require 'emacsconf-erc)
(require 'emacsconf-stream)
-
+(require 'subed)
+(require 'subed-vtt)
+(require 'subed-common)
(setq emacsconf-tracks
'((:name "General" :color "peachpuff" :id "gen" :channel "emacsconf-gen"
- :tramp "/ssh:gen:")
+ :tramp "/ssh:emacsconf-gen@res.emacsconf.org#46668:")
(:name "Development" :color "skyblue" :id "dev" :channel "emacsconf-dev"
- :tramp "/ssh:dev:")))
-(setq emacsconf-stream-overlay-dir
- (expand-file-name "overlays" (file-name-directory emacsconf-org-file)))
-(setq emacsconf-stream-asset-dir
- (expand-file-name "assets" (file-name-directory emacsconf-org-file)))
+ :tramp "/ssh:emacsconf-dev@res.emacsconf.org#46668:")))
+