Files
WitShop/.gitea/workflows/deploy.yml
T
marcoandClaude Sonnet 4.6 5dad8b9324
Deploy to Production (witstore.wende.it) / deploy (push) Successful in 7s
Add email templates, page layouts, and shop themes (template system)
- E-Mail-Templates: DB-gespeicherte HTML-Templates mit {{placeholder}}-System,
  Admin-UI zum Bearbeiten von Betreff und Body, alle 4 Mailables aktualisiert
- Seiten-Layouts: 4 Layouts für CMS-Seiten (Standard, Sidebar, Volle Breite, Landing),
  Layout-Auswahl im Admin-Formular
- Shop-Themes: 5 Farbthemen via CSS-Variablen, Picker in Einstellungen
- Deployment: EmailTemplateSeeder wird automatisch beim Deploy ausgeführt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 22:04:54 +02:00

58 lines
2.2 KiB
YAML

name: Deploy to Production (witstore.wende.it)
on:
push:
branches:
- DEV
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy via SSH
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
script: |
set -e
DEPLOY_PATH="/var/www/vhosts/wende.it/witstore.wende.it"
GIT_URL="https://marco:${{ secrets.GIT_TOKEN }}@git.wende.it/marco/WitShop.git"
if [ ! -d "$DEPLOY_PATH/.git" ]; then
echo "==> Git initialisieren"
cd "$DEPLOY_PATH"
git init
git remote add origin "$GIT_URL"
git fetch origin DEV
git reset --hard origin/DEV
git checkout -b DEV || git checkout DEV
else
echo "==> Code aktualisieren"
cd "$DEPLOY_PATH"
git remote set-url origin "$GIT_URL"
git fetch origin DEV
git reset --hard origin/DEV
fi
cd "$DEPLOY_PATH"
/opt/plesk/php/8.4/bin/php -d open_basedir="" /usr/local/psa/var/modules/composer/composer.phar install --no-dev --optimize-autoloader
/opt/plesk/php/8.4/bin/php -d open_basedir="" artisan config:clear
/opt/plesk/php/8.4/bin/php -d open_basedir="" artisan route:clear
/opt/plesk/php/8.4/bin/php -d open_basedir="" artisan view:clear
/opt/plesk/php/8.4/bin/php -d open_basedir="" artisan migrate --force
/opt/plesk/php/8.4/bin/php -d open_basedir="" artisan db:seed --class=EmailTemplateSeeder --force
/opt/plesk/php/8.4/bin/php -d open_basedir="" artisan config:cache
/opt/plesk/php/8.4/bin/php -d open_basedir="" artisan route:cache
/opt/plesk/php/8.4/bin/php -d open_basedir="" artisan view:cache
export PATH="$HOME/.nodenv/versions/24/bin:$HOME/.nodenv/shims:$HOME/.nodenv/bin:$PATH"
npm ci
npm run build
echo "Deployment abgeschlossen: $(date)"