forked from phc/tutorato
1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
915 B
YAML

# 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
steps:
- name: deploy
image: node:latest
volumes:
- name: host-tutorato-dist
path: /drone/src/dist
commands:
- npm install
- npm run build
volumes:
- name: host-tutorato-dist
host: # this volume is mounted on the host machine
path: /var/www/tutorato
trigger:
branch:
- main
event:
- push
---
kind: pipeline
type: exec # this job is executed on the host machine
name: caddy-permissions
depends_on:
- default
steps:
- name: chown
commands:
- chown -R caddy:caddy /var/www/tutorato
trigger:
branch:
- main
event:
- push