]> git.ekhem.eu.org Git - turnup.git/commitdiff
Add a script for exporting CV.
authorJakub Czajka <jakub@ekhem.eu.org>
Wed, 27 Sep 2023 21:10:37 +0000 (23:10 +0200)
committerJakub Czajka <jczajka@google.com>
Sun, 24 Dec 2023 18:46:45 +0000 (19:46 +0100)
cv.yaml [new file with mode: 0644]
turnup.yaml

diff --git a/cv.yaml b/cv.yaml
new file mode 100644 (file)
index 0000000..8c4361c
--- /dev/null
+++ b/cv.yaml
@@ -0,0 +1,31 @@
+# Copyright (c) 2023 Jakub Czajka <jakub@ekhem.eu.org>
+# License: GPL-3.0 or later.
+
+- hosts: servers
+  vars:
+    repos:
+      - /srv/git/cv.git
+    dest: "/srv/prod/cv"
+  tasks:
+    - name: Ensure destination directory exists
+      file:
+        path: "{{ dest }}"
+        mode: 0775
+        state: directory
+        owner: git
+        group: git
+      become: true
+    - name: Checkout to the destination directory
+      command: |
+        git --work-tree={{ dest }} --git-dir={{ item }} checkout main --force
+      become: yes
+      with_items: "{{ repos }}"
+    - name: Install texlive
+      package:
+        name:
+          - texlive
+        state: latest
+      become: yes
+    - name: Compile CV
+      command: pdflatex --output-directory=/srv/prod/cv /srv/prod/cv/cv.tex
+      become: yes
index 691a5b5d2e0070e8fcc7b758b5aeeea95251c7e8..c6ef9ea976a2c2df6dac66ffe7c5c526e99262a2 100644 (file)
@@ -27,3 +27,6 @@
 
 - name: Deploy server
   import_playbook: server.yaml
+
+- name: Deploy cv
+  import_playbook: cv.yaml