Add drone file, cleanup Astro config
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
46a3a76660
commit
1df06a8c88
@ -0,0 +1,49 @@
|
|||||||
|
# This file defines a Drone pipeline that builds a static website with "npm run build". This
|
||||||
|
# pipeline must be marked as "Trusted" in the Drone project settings.
|
||||||
|
#
|
||||||
|
# We mount the target directory of the project at "/var/www/{project}" to the container
|
||||||
|
# "dist/" directory and the run the build. A caveat is that the container builds files
|
||||||
|
# with "root" permissions, so we need to fix those after each build with a second pipeline.
|
||||||
|
|
||||||
|
kind: pipeline
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: deploy
|
||||||
|
image: node:latest
|
||||||
|
volumes:
|
||||||
|
- name: host-website-dist
|
||||||
|
path: /drone/src/dist
|
||||||
|
commands:
|
||||||
|
- npm install
|
||||||
|
- npm run build
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: host-website-dist
|
||||||
|
host: # this volume is mounted on the host machine
|
||||||
|
path: /var/www/website
|
||||||
|
|
||||||
|
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/website
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
event:
|
||||||
|
- push
|
Loading…
Reference in New Issue