diff --git a/roles/codimd/handlers/main.yml b/roles/codimd/handlers/main.yml index 4dccff2..3481773 100644 --- a/roles/codimd/handlers/main.yml +++ b/roles/codimd/handlers/main.yml @@ -1,7 +1,7 @@ --- # Build front-end bundle - name: Build front-end for CodiMD - command: npm run build + command: yarn run build args: chdir: /var/local/codimd/codimd become: true diff --git a/roles/codimd/tasks/0_apt_dependencies.yml b/roles/codimd/tasks/0_apt_dependencies.yml index 158c59e..d9bc109 100644 --- a/roles/codimd/tasks/0_apt_dependencies.yml +++ b/roles/codimd/tasks/0_apt_dependencies.yml @@ -9,6 +9,11 @@ dest: /etc/apt/preferences.d/nodejs mode: 0644 +# TODO +# apt-transport-https +# curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - +# echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list + # Install CodiMD dependencies - name: Install required packages apt: @@ -20,4 +25,4 @@ - nodejs - npm - build-essential - - zlib1g-dev # uws module + - yarn diff --git a/roles/codimd/tasks/main.yml b/roles/codimd/tasks/main.yml index 051248d..cbfd9a2 100644 --- a/roles/codimd/tasks/main.yml +++ b/roles/codimd/tasks/main.yml @@ -6,15 +6,14 @@ - include_tasks: 1_user_group.yml # Download CodiMD -# TODO : temporally disabled until 1.3.0 is out (because of uws bug) -# - name: Clone CodiMD project -# git: -# repo: https://github.com/hackmdio/codimd.git -# dest: /var/local/codimd/codimd -# version: 1.2.1 -# become: true -# become_user: codimd -# notify: Build front-end for CodiMD +- name: Clone CodiMD project + git: + repo: https://github.com/hackmdio/codimd.git + dest: /var/local/codimd/codimd + version: 1.3.0 + become: true + become_user: codimd + notify: Build front-end for CodiMD # Setup dependencies and configs - name: Install CodiMD depedencies @@ -33,14 +32,6 @@ group: codimd mode: 0600 -# Update database -- name: Migrate the db to the latest schema - command: node_modules/.bin/sequelize db:migrate - args: - chdir: /var/local/codimd/codimd - become: true - become_user: codimd - # Configure - name: Configure CodiMD template: