kh3_website/.drone.yml

31 lines
719 B
YAML

kind: pipeline
type: docker
name: deploy
steps:
- name: build
image: node:18-alpine
commands:
# Install git-lfs in the build container
- apk add --no-cache git git-lfs
# Initialize LFS and pull LFS files
- git lfs install
- git lfs pull
# Install dependencies and build
- npm ci || npm install
- npm run build || npm build
- name: sync-files
image: alpine:latest
volumes:
- name: website-data
path: /host-target
commands:
# Copy all files (LFS files already pulled in build step)
- cp -a . /host-target
- chmod -R 777 /host-target
volumes:
- name: website-data
host:
path: /root/kh3website/data/html