payload-contracts/templates/plesk-post-deploy.sh
Martin Porwoll 715783dbf3 docs: add frontend conventions, CI/CD templates, and deployment scripts
- Frontend conventions document (setup, patterns, workflow)
- CI workflow template for GitHub Actions
- Staging deploy workflow template
- Plesk post-deploy script template

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 17:53:09 +00:00

21 lines
505 B
Bash

#!/bin/bash
# Plesk Post-Deploy Script
# Configure in: Plesk → Domain → Git → Post-deploy actions
#
# This runs after Plesk pulls the latest code from the main branch.
set -e
export NODE_ENV=production
export PATH=/opt/plesk/node/22/bin:$PATH
echo "[deploy] Installing dependencies..."
pnpm install --frozen-lockfile 2>/dev/null || npm ci
echo "[deploy] Building..."
pnpm build 2>/dev/null || npm run build
echo "[deploy] Restarting application..."
touch tmp/restart.txt
echo "[deploy] Done!"