refactor: streamline .drone.yml for improved readability and maintainability

This commit is contained in:
George Birikorang 2025-09-16 18:58:39 -07:00
parent de2745e433
commit 2e98e6cc02

View file

@ -3,28 +3,28 @@ type: docker
name: deploy name: deploy
steps: steps:
- name: build - name: build
image: node:18-alpine image: node:18-alpine
commands: commands:
- npm ci || npm install - npm ci || npm install
- npm run build || npm build - npm run build || npm build
- name: sync-files - name: sync-files
image: alpine:latest image: alpine:latest
volumes: volumes:
- name: website-data - name: website-data
path: /host-target path: /host-target
commands: commands:
# Install git-lfs in the container # Install git-lfs in the container
- apk add --no-cache git git-lfs - apk add --no-cache git git-lfs
# Initialize LFS and pull LFS files # Initialize LFS and pull LFS files
- git lfs install - git lfs install
- git lfs pull - git lfs pull
# Then copy all files (including LFS files) # Then copy all files (including LFS files)
- cp -a . /host-target - cp -a . /host-target
- chmod -R 777 /host-target - chmod -R 777 /host-target
volumes: volumes:
- name: website-data - name: website-data
host: host:
path: /root/kh3website/data/html path: /root/kh3website/data/html