Compare commits
No commits in common. "ba019377030cb5b7fce30c04c940bb92f22cf9dd" and "8fe289e270591bbe8b2e64cc3bf3d8bbe0b3b00c" have entirely different histories.
ba01937703
...
8fe289e270
13
.drone.yml
13
.drone.yml
@ -6,17 +6,11 @@ name: default
|
|||||||
steps:
|
steps:
|
||||||
- name: test & build
|
- name: test & build
|
||||||
image: node:18.16.0-bullseye
|
image: node:18.16.0-bullseye
|
||||||
volumes:
|
|
||||||
- name: pnpm-store-cache
|
|
||||||
path: /drone/.pnpm-store
|
|
||||||
commands:
|
commands:
|
||||||
# - git config --global --add safe.directory "/drone/src"
|
# - git config --global --add safe.directory "/drone/src"
|
||||||
- corepack enable # npm i -g pnpm
|
- npm install -g pnpm
|
||||||
- pnpm i --frozen-lockfile
|
- pnpm i --frozen-lockfile
|
||||||
- pnpm build
|
- pnpm build
|
||||||
environment:
|
|
||||||
npm_config_store_dir: /drone/.pnpm-store
|
|
||||||
npm_config_package_import_method: copy
|
|
||||||
|
|
||||||
- name: publish
|
- name: publish
|
||||||
image: node:18.16.0-bullseye
|
image: node:18.16.0-bullseye
|
||||||
@ -34,8 +28,3 @@ steps:
|
|||||||
- (cd dist && zip -r -9 ../um-react.zip .)
|
- (cd dist && zip -r -9 ../um-react.zip .)
|
||||||
- ./scripts/publish.sh
|
- ./scripts/publish.sh
|
||||||
- ./scripts/deploy.sh
|
- ./scripts/deploy.sh
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: pnpm-store-cache
|
|
||||||
host:
|
|
||||||
path: /tmp/.pnpm-store
|
|
||||||
|
@ -3,19 +3,15 @@
|
|||||||
BRANCH_NAME="$(git branch --show-current)"
|
BRANCH_NAME="$(git branch --show-current)"
|
||||||
|
|
||||||
__netlify_upload() {
|
__netlify_upload() {
|
||||||
local branch="$BRANCH_NAME"
|
|
||||||
local production="$DEPLOY_PRODUCTION"
|
local production="$DEPLOY_PRODUCTION"
|
||||||
[[ -z "$production" ]] && production="false"
|
[[ -z "$production" ]] && production="false"
|
||||||
if [[ "$BRANCH_NAME" = "main" ]]; then
|
[[ "$BRANCH_NAME" = "main" ]] && production="true"
|
||||||
production="true"
|
|
||||||
branch=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
curl -sL \
|
curl -sL \
|
||||||
-H "Content-Type: application/zip" \
|
-H "Content-Type: application/zip" \
|
||||||
-H "Authorization: Bearer ${NETLIFY_API_KEY}" \
|
-H "Authorization: Bearer ${NETLIFY_API_KEY}" \
|
||||||
--data-binary "@${1}" \
|
--data-binary "@${1}" \
|
||||||
"https://api.netlify.com/api/v1/sites/${NETLIFY_SITE_ID}/deploys?branch=${branch}&production=${production}"
|
"https://api.netlify.com/api/v1/sites/${NETLIFY_SITE_ID}/deploys?branch=${BRANCH_NAME}&production=${production}"
|
||||||
}
|
}
|
||||||
|
|
||||||
__netlify_get_deploy() {
|
__netlify_get_deploy() {
|
||||||
|
Loading…
Reference in New Issue
Block a user