-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.drone.yml
52 lines (48 loc) · 1.06 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
kind: pipeline
type: docker
name: Node use pnpm build
steps:
- name: restore-cache
image: drillster/drone-volume-cache
settings:
restore: true
mount:
- ./.npm-cache
- ./pnpm-lock.yaml
- ./node_modules
volumes:
- name: cache
path: /cache
- name: build
image: node:20
environment:
NODE_OPTIONS: --max-old-space-size=1024
volumes:
- name: docker-volumes
path: /docker-volumes/site-index
commands:
- npm config set cache ./.npm-cache --global
- npm config set registry https://registry.npmjs.com
- npm install -g pnpm
- pnpm install --frozen-lockfile
- pnpm build:ali
- rm -rf /docker-volumes/site-index/*
- cp -r ./dist/* /docker-volumes/site-index
- name: rebuild-cache
image: drillster/drone-volume-cache
settings:
rebuild: true
mount:
- ./.npm-cache
- ./pnpm-lock.yaml
- ./node_modules
volumes:
- name: cache
path: /cache
volumes:
- name: docker-volumes
host:
path: /www/wwwroot/site-index
- name: cache
host:
path: /root/cache/site-index