diff --git a/ansible/roles/markdown-table-align/tasks/main.yml b/ansible/roles/markdown-table-align/tasks/main.yml new file mode 100644 index 0000000..bdf5e02 --- /dev/null +++ b/ansible/roles/markdown-table-align/tasks/main.yml @@ -0,0 +1,29 @@ +--- +- name: Clone the repository + ansible.builtin.git: + repo: https://github.com/aminnairi/markdown-table-align + dest: /$HOME/Documents/git/github.com/aminnairi/markdown-table-align + register: git_clone_result + +- name: Install Deno + pacman: + name: deno + state: latest + +- name: Compile the binary + ansible.builtin.command: + chdir: /$HOME/Documents/git/github.com/aminnairi/markdown-table-align + run: deno compile index.ts + when: git_clone_result.changed + +- name: Copy the binary + ansible.builtin.copy: + src: /$HOME/Documents/git/github.com/aminnairi/markdown-table-align/markdown-table-align + dest: /$HOME/.local/bin + when: git_clone_result.changed + +- name: Remove the binary + ansible.builtin.file: + path: /$HOME/Document/git/github.com/aminnairi/markdown-table-align/markdown-table-align + state: absent + when: git_clone_result.changed