diff --git a/roles/matrix-appservice-discord/tasks/main.yml b/roles/matrix-appservice-discord/tasks/main.yml index e3ed0b1..a43642b 100644 --- a/roles/matrix-appservice-discord/tasks/main.yml +++ b/roles/matrix-appservice-discord/tasks/main.yml @@ -15,18 +15,20 @@ become_user: matrix-appservice-discord # Setup dependencies +# May create issues with package-lock.json not in gitignore - name: Install matrix-appservice-discord dependencies - command: npm ci - args: - chdir: /var/local/matrix-appservice-discord/matrix-appservice-discord + npm: + path: /var/local/matrix-appservice-discord/matrix-appservice-discord become: true become_user: matrix-appservice-discord # Typescript into javascript - name: Compile matrix-appservice-discord - command: npm run build + command: ./node_modules/.bin/tsc args: chdir: /var/local/matrix-appservice-discord/matrix-appservice-discord + register: npm_build_result + changed_when: npm_build_result become: true become_user: matrix-appservice-discord