commit 43242102ea7df1c35fe22d47646eb8fcd8c1c681 Author: npmrun <1549469775@qq.com> Date: Wed Apr 29 16:26:09 2026 +0800 deploy: build at 2026-04-29 16:25:08 diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..5b9b727 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,43 @@ +kind: pipeline +type: exec +name: deploy +clone: + disable: true + +trigger: + branch: + - deploy + event: + - push + +steps: + - name: deploy + environment: + DEPLOY_SSH_KEY: + from_secret: DEPLOY_SSH_KEY + DATABASE_URL: + from_secret: DATABASE_URL + STATIC_DIR: + from_secret: STATIC_DIR + TMP_DIR: + from_secret: TMP_DIR + NUXT_PUBLIC_SITE_URL: + from_secret: NUXT_PUBLIC_SITE_URL + BOOTSTRAP_ADMIN_USERNAME: + from_secret: BOOTSTRAP_ADMIN_USERNAME + BOOTSTRAP_ADMIN_PASSWORD: + from_secret: BOOTSTRAP_ADMIN_PASSWORD + commands: + - export HOME=/root + - mkdir -p "$HOME/.ssh" + - chmod 700 "$HOME/.ssh" + - 'printf "%s\n" "$DEPLOY_SSH_KEY" > "$HOME/.ssh/id_rsa"' + - chmod 600 "$HOME/.ssh/id_rsa" + - 'ssh-keyscan -p 8892 -H git.xieyaxin.top >> "$HOME/.ssh/known_hosts"' + - chmod 644 "$HOME/.ssh/known_hosts" + - 'export SSH_OPTS="-i $HOME/.ssh/id_rsa -o IdentitiesOnly=yes -o UserKnownHostsFile=$HOME/.ssh/known_hosts -o StrictHostKeyChecking=accept-new -o BatchMode=yes -o ConnectTimeout=10 -o ServerAliveInterval=15 -o ServerAliveCountMax=3"' + - 'ssh $SSH_OPTS -T -p 8892 root@git.xieyaxin.top || true' + - 'REPO_DIR="$HOME/projects/nuxt4-demo/nuxt4-demo"; if [ -d "$REPO_DIR/.git" ]; then GIT_SSH_COMMAND="ssh $SSH_OPTS" git -C "$REPO_DIR" fetch origin deploy && git -C "$REPO_DIR" checkout -B deploy origin/deploy; else rm -rf "$REPO_DIR" && mkdir -p "$(dirname "$REPO_DIR")" && GIT_SSH_COMMAND="ssh $SSH_OPTS" git clone --depth 1 -b deploy "ssh://root@git.xieyaxin.top:8892/topuser/nuxt4-demo.git" "$REPO_DIR"; fi' + - 'bash -lc "cd $HOME/projects/nuxt4-demo/nuxt4-demo && pm2 stop nuxt4-demo || true"' + - 'bash -lc "cd $HOME/projects/nuxt4-demo/nuxt4-demo && pm2 delete nuxt4-demo || true"' + - 'bash -lc "cd $HOME/projects/nuxt4-demo/nuxt4-demo && pm2 start ./run.sh --name nuxt4-demo"' \ No newline at end of file diff --git a/build-output.tar.gz b/build-output.tar.gz new file mode 100644 index 0000000..6da7cab Binary files /dev/null and b/build-output.tar.gz differ