From 5a6d61f35fc8be27388e7b11a8914b86d1b6c7e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Sat, 10 Jun 2023 21:49:00 +0100 Subject: [PATCH] ci: fix existing deployment --- .drone.yml | 7 ++++--- scripts/deploy.sh | 2 ++ scripts/read_json.mjs | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0a8b0d4..027ff27 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,8 +7,9 @@ steps: - name: test & build image: node:18.16.0-bullseye commands: - # - git config --global --add safe.directory "/drone/src" - - npm install -g pnpm + # - git config --global --add safe.directory "/drone/src" + - corepack enable + - corepack prepare pnpm@latest --activate - pnpm i --frozen-lockfile - pnpm build environment: @@ -26,7 +27,7 @@ steps: NETLIFY_API_KEY: from_secret: NETLIFY_API_KEY commands: - # - git config --global --add safe.directory "/drone/src" + # - git config --global --add safe.directory "/drone/src" - python3 -m zipfile -c um-react.zip dist/. - ./scripts/publish.sh - ./scripts/deploy.sh diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 616b0b8..1e163ae 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -79,4 +79,6 @@ deploy_netlify() { if [[ -n "${NETLIFY_API_KEY}" && -n "${NETLIFY_SITE_ID}" ]]; then echo "Deploy to netlify..." deploy_netlify um-react.zip +else + echo "skip netlify deployment." fi diff --git a/scripts/read_json.mjs b/scripts/read_json.mjs index 007b167..32e2c30 100755 --- a/scripts/read_json.mjs +++ b/scripts/read_json.mjs @@ -1,4 +1,4 @@ -#!/bin/env node +#!/usr/bin/env node /* eslint-env node */ import fs from 'fs';