mirror of
https://git.unlock-music.dev/um/um-react.git
synced 2024-11-23 20:02:16 +00:00
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
steps:
|
|
- name: test & build
|
|
image: node:18.16.0-bullseye
|
|
volumes:
|
|
- name: pnpm-store-cache
|
|
path: /drone/.pnpm-store
|
|
commands:
|
|
# - git config --global --add safe.directory "/drone/src"
|
|
- corepack enable # npm i -g pnpm
|
|
- pnpm i --frozen-lockfile
|
|
- pnpm build
|
|
environment:
|
|
npm_config_store_dir: /drone/.pnpm-store
|
|
npm_config_package_import_method: copy
|
|
|
|
- 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"
|
|
- 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
|
|
|
|
volumes:
|
|
- name: pnpm-store-cache
|
|
host:
|
|
path: /tmp/.pnpm-store
|