From b46556727114472f080fb1d326470e0371b11b09 Mon Sep 17 00:00:00 2001 From: Etzelia Date: Mon, 26 Oct 2020 22:33:03 -0500 Subject: [PATCH] Add Drone file Signed-off-by: Etzelia --- .drone.yml | 33 +++++++++++++++++++++++++++++++++ README.md | 4 +++- package.json | 3 +-- src/assets/sass/main.scss | 2 +- 4 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..75b6a28 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,33 @@ +--- +kind: pipeline +name: release +trigger: + event: + - push + branch: + - main +steps: + - name: build + pull: always + image: node:14 + commands: + - npm install + - npm run webfonts + - npm run sass + - npm run dist + - name: archive + pull: always + image: jolheiser/drone-arc:latest + settings: + files: + - "dist/*" + output: dist.tar.gz + - name: gitea-release + pull: always + image: jolheiser/drone-gitea-main:latest + settings: + token: + from_secret: gitea_token + base: https://git.etztech.xyz + files: + - "dist.tar.gz" \ No newline at end of file diff --git a/README.md b/README.md index a3ae5da..afd2be4 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,9 @@ For development scripts, see [package.json](package.json) ## Development -`npm install` +- `npm install` +- `npm run webfonts` +- `npm run sass` ## Release diff --git a/package.json b/package.json index 77f008f..0a11c6a 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,7 @@ "sass-noscript": "npx dart-sass -s compressed src/assets/sass/noscript.scss src/assets/css/noscript.css", "sass": "npm run sass-main && npm run sass-noscript", "webfonts": "npx copyfiles --flat node_modules/@fortawesome/fontawesome-free/webfonts/* src/assets/webfonts/", - "dist": "npx copyfiles --exclude src/elements.html --exclude src/generic.html --up 1 src/* src/assets/css/* src/assets/js/* src/assets/webfonts/* src/images/* dist/", - "postinstall": "npm run webfonts && npm run sass" + "dist": "npx copyfiles --exclude src/elements.html --exclude src/generic.html --up 1 src/* src/assets/css/* src/assets/js/* src/assets/webfonts/* src/images/* dist/" }, "repository": { "type": "git", diff --git a/src/assets/sass/main.scss b/src/assets/sass/main.scss index 525f142..684b365 100644 --- a/src/assets/sass/main.scss +++ b/src/assets/sass/main.scss @@ -6,7 +6,7 @@ @import "libs/html-grid"; // FontAwesome -$fa-font-path: "../../../node_modules/@fortawesome/fontawesome-free/webfonts"; +$fa-font-path: "../webfonts"; @import "../../../node_modules/@fortawesome/fontawesome-free/scss/fontawesome"; @import "../../../node_modules/@fortawesome/fontawesome-free/scss/solid"; @import "https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400";