mirror of
https://git.unlock-music.dev/um/um-react.git
synced 2024-11-23 20:02:16 +00:00
36 lines
1.0 KiB
YAML
36 lines
1.0 KiB
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
steps:
|
|
- name: test & build
|
|
image: node:18.16.0-bullseye
|
|
commands:
|
|
# - git config --global --add safe.directory "/drone/src"
|
|
- npm install -g pnpm
|
|
- pnpm i --frozen-lockfile
|
|
- pnpm build
|
|
environment:
|
|
# 让 npm 使用淘宝源
|
|
npm_config_registry: https://registry.npmmirror.com
|
|
|
|
- name: publish
|
|
image: node:18.16.0-bullseye
|
|
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:
|
|
# - git config --global --add safe.directory "/drone/src"
|
|
# 让 Debian 使用网易源。阿里的源有限速。
|
|
- sed -i 's/deb.debian.org/mirrors.163.com/g' /etc/apt/sources.list
|
|
- apt-get update && apt-get install -y zip jq tar gzip curl
|
|
- (cd dist && zip -r -9 ../um-react.zip .)
|
|
- ./scripts/publish.sh
|
|
- ./scripts/deploy.sh
|