forked from phc/tutorato
1
0
Fork 0

chore: polished drone build script

main
Antonio De Lucreziis 2 months ago
parent f073a4a929
commit b501fbcb41

@ -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 kind: pipeline
name: default name: default
@ -7,17 +13,13 @@ steps:
volumes: volumes:
- name: host-tutorato-dist - name: host-tutorato-dist
path: /drone/src/dist path: /drone/src/dist
environment:
BASE_URL:
from_secret: base_url
commands: commands:
- pwd
- npm install - npm install
- npm run build - npm run build
volumes: volumes:
- name: host-tutorato-dist - name: host-tutorato-dist
host: host: # this volume is mounted on the host machine
path: /var/www/tutorato path: /var/www/tutorato
trigger: trigger:
@ -28,7 +30,7 @@ trigger:
--- ---
kind: pipeline kind: pipeline
type: exec type: exec # this job is executed on the host machine
name: caddy-permissions name: caddy-permissions
depends_on: depends_on:

Loading…
Cancel
Save