From 5ed50835c278f70ac8914b436cae9dffa90e7dc0 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 2 Jun 2020 22:23:25 +0200 Subject: [PATCH] beautify docs html befor publishing --- .drone.jsonnet | 14 +++++++++++++- .drone.yml | 15 ++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index a47af40..b3d5d31 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -243,7 +243,7 @@ local PipelineDocs = { 'link-validator -ro', ], environment: { - LINK_VALIDATOR_BASE_DIR: 'exampleSite/public', + LINK_VALIDATOR_BASE_DIR: 'docs/public', }, }, { @@ -261,6 +261,18 @@ local PipelineDocs = { 'cd docs/ && hugo-official', ], }, + { + name: 'beautify', + image: 'node:lts-alpine', + commands: [ + 'npm install -g js-beautify', + "html-beautify -r -f 'docs/public/**/*.html'", + ], + environment: { + FORCE_COLOR: true, + NPM_CONFIG_LOGLEVEL: 'error', + }, + }, { name: 'publish', image: 'plugins/s3-sync', diff --git a/.drone.yml b/.drone.yml index dbdae1c..093dc1a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -361,7 +361,7 @@ steps: commands: - link-validator -ro environment: - LINK_VALIDATOR_BASE_DIR: exampleSite/public + LINK_VALIDATOR_BASE_DIR: docs/public - name: assets image: byrnedo/alpine-curl @@ -374,6 +374,15 @@ steps: commands: - cd docs/ && hugo-official +- name: beautify + image: node:lts-alpine + commands: + - npm install -g js-beautify + - html-beautify -r -f 'docs/public/**/*.html' + environment: + FORCE_COLOR: true + NPM_CONFIG_LOGLEVEL: error + - name: publish image: plugins/s3-sync settings: @@ -456,4 +465,8 @@ trigger: depends_on: - docs +--- +kind: signature +hmac: af3f94eba4fbf0f057d225eaf237ef36b5631e3121a7d1beb54a1dbb0938caaf + ...