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