-
Notifications
You must be signed in to change notification settings - Fork 2
/
.drone.yml
35 lines (33 loc) · 970 Bytes
/
.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
---
kind: pipeline
type: docker
name: default
steps:
- name: test & build
image: node:20.10.0-bookworm
commands:
# - git config --global --add safe.directory "/drone/src"
- corepack enable
- corepack prepare pnpm@latest --activate
- pnpm i --frozen-lockfile
- pnpm build
environment:
# 让 npm 使用淘宝源
npm_config_registry: https://registry.npmmirror.com
- name: publish
image: node:20.10.0-bookworm
environment:
DRONE_GITEA_SERVER: https://git.unlock-music.dev
GITEA_API_KEY:
from_secret: GITEA_API_KEY
NETLIFY_SITE_ID:
from_secret: NETLIFY_SITE_ID
NETLIFY_API_KEY:
from_secret: NETLIFY_API_KEY
commands:
- |
python3 -m zipfile -c um-react.zip dist/.
cp um-react.zip dist/release-"${DRONE_COMMIT_SHA}".zip
python3 -m zipfile -c um-react-site.zip dist/.
# - ./scripts/publish.sh
- ./scripts/deploy.sh