From b501fbcb416d20205743d012c8a4a5f8f8e7701a Mon Sep 17 00:00:00 2001 From: Antonio De Lucreziis Date: Wed, 2 Oct 2024 01:36:24 +0200 Subject: [PATCH] chore: polished drone build script --- .drone.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index 189cbed..fe0b985 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,3 +1,9 @@ +# This file defines a Drone pipeline that builds a static website with "npm run build". +# +# We mount the target directory of the project under "/var/www/{project}" to the +# container "dist/" directory. A caveat is that the container builds files with "root" +# permissions, so we need to fix those after each build. + kind: pipeline name: default @@ -7,17 +13,13 @@ steps: volumes: - name: host-tutorato-dist path: /drone/src/dist - environment: - BASE_URL: - from_secret: base_url commands: - - pwd - npm install - npm run build volumes: - name: host-tutorato-dist - host: + host: # this volume is mounted on the host machine path: /var/www/tutorato trigger: @@ -28,7 +30,7 @@ trigger: --- kind: pipeline -type: exec +type: exec # this job is executed on the host machine name: caddy-permissions depends_on: