Files
Mieterportal/.gitea/workflows/deploy.yml
T
2026-10-04 21:52:24 +02:00

43 lines
1.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Build & Deploy
# Fährt automatisch bei jedem Push auf main aus:
# Abhängigkeiten → Typecheck → Build → Deploy auf mieterportal.hocks.eu → Health-Check.
# Die Anleitungsseiten (src/pages/Anleitung.tsx, src/data/anleitung.ts) werden
# mit jedem Deploy automatisch aktualisiert, weil sie Teil des Builds sind.
on:
push:
branches: [main]
jobs:
deploy:
runs-on: docker
container:
image: node:22-alpine
# /opt/mieterportal des Hosts steht im Job als /mp bereit (Whitelist im Runner)
options: -v /opt/mieterportal:/mp
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Abhängigkeiten installieren
run: npm ci
- name: Typecheck
run: npx tsc --noEmit
- name: Build
run: npm run build
- name: Deploy auf mieterportal.hocks.eu
run: |
rm -rf /mp/dist/*
cp -a dist/. /mp/dist/
- name: Health-Check
run: |
apk add --no-cache curl
sleep 3
curl -sf https://mieterportal.hocks.eu/ > /dev/null
echo "Portal antwortet – Deploy erfolgreich"