From 222dbd6da15ed847d13bf3ed10e53dc620e65ba8 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 12 Oct 2024 21:54:45 +0200 Subject: [PATCH] feat: add drone config --- .drone.yml | 32 ++++++++++++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..cb2bc09 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,32 @@ +kind: pipeline +name: production +when: + event: [ push ] + branch: [ master ] + +clone: + git: + image: plugins/git + pull: true + +steps: + - name: build + image: node:latest + commands: + - npm i + - npm run compile + + - name: deploy + image: drillster/drone-rsync + settings: + hosts: + from_secret: deploy_host + target: /var/www/moineau.kazhnuz.space + source: dist/* + user: + from_secret: deploy_user + key: + from_secret: deploy_key + when: + branch: master + delete: true diff --git a/package.json b/package.json index ae6456a..d13a901 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "minify-no-source-map": "sass --watch --no-source-map scss/moineau.scss --style compressed dist/css/moineau.min.css", "build": "sass scss/moineau.scss dist/css/moineau.css && sass scss/moineau.scss --style compressed dist/css/moineau.min.css", "serve": "http-server ./dist & npm run site & npm run minify", - "site": "cp data/cat.jpg dist/cat.jpg & node generate.js" + "site": "cp data/cat.jpg dist/cat.jpg & node generate.js", + "compile": "sass scss/moineau.scss --style compressed dist/css/moineau.min.css && npm run site" }, "repository": { "type": "git",