WangDL c53fbfa70a
All checks were successful
Deploy Website / build-and-deploy (push) Successful in 12s
add CI/CD deploy workflow, remove migrated DESIGN.md
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 16:20:47 +08:00

33 lines
791 B
YAML

name: Deploy Website
on:
push:
branches: [main]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
run: |
if [ -d /tmp/web-projects ]; then
cd /tmp/web-projects && git pull
else
git clone http://localhost:3000/suche-Hermes/web-projects.git /tmp/web-projects
fi
- name: Build Astro site
run: |
docker run --rm \
-v /tmp/web-projects:/app \
-w /app \
node:22-alpine sh -c "npm install && npm run build"
- name: Deploy to web root
run: |
rm -rf /var/www/longde.cloud/*
cp -r /tmp/web-projects/dist/* /var/www/longde.cloud/
- name: Reload Nginx
run: nginx -s reload