kh3_website/.drone.yml

37 lines
889 B
YAML

kind: pipeline
type: docker
name: deploy
steps:
- name: build
image: node:18-alpine
volumes:
- name: website-data
path: /host-target
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
# Copy built files to deployment directory
- cp -a . /host-target
- chmod -R 777 /host-target
- name: sync-files
image: alpine:latest
volumes:
- name: website-data
path: /host-target
commands:
# Verify deployment was successful
- ls -la /host-target
- echo "Deployment completed successfully"
volumes:
- name: website-data
host:
path: /root/kh3website/data/html