From 741e302ea7347d66b10225df07deee3bb8b46537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Thu, 18 Jan 2024 00:29:37 +0000 Subject: [PATCH] ci: publish site deployment to netlify as well --- .drone.yml | 6 ++++-- scripts/deploy.sh | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 8b9f3fa..5f295ce 100644 --- a/.drone.yml +++ b/.drone.yml @@ -27,7 +27,9 @@ steps: NETLIFY_API_KEY: from_secret: NETLIFY_API_KEY commands: - # - git config --global --add safe.directory "/drone/src" - - python3 -m zipfile -c um-react.zip dist/. + - | + 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 diff --git a/scripts/deploy.sh b/scripts/deploy.sh index ea7a1ca..efbbace 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -104,7 +104,7 @@ deploy_netlify() { # For deployment, we care a bit less if [[ -n "${NETLIFY_API_KEY}" && -n "${NETLIFY_SITE_ID}" ]]; then echo "Deploy to netlify..." - deploy_netlify um-react.zip + deploy_netlify um-react-site.zip else echo "skip netlify deployment." fi