Files
1bis8/.gitea/workflows/deploy.yml
T
2026-10-10 16:38:08 +02:00

41 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 → Build → dist/ auf den VPS kopieren → Health-Check.
# Das dist/-Verzeichnis ist auf dem Web-Container als Laufzeit-Mount
# eingebunden (/opt/1bis8/web/dist), nginx pickt neue Dateien sofort auf.
on:
push:
branches: [main]
jobs:
deploy:
runs-on: docker
container:
image: node:22-alpine
# /opt/1bis8 des Hosts steht im Job als /deploy bereit (Whitelist im Runner)
options: -v /opt/1bis8:/deploy
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Abhängigkeiten installieren
run: cd app && npm ci
- name: Build
run: cd app && npm run build
- name: Deploy auf 1bis.hocks.eu
run: |
rm -rf /deploy/web/dist/*
cp -a app/dist/. /deploy/web/dist/
- name: Health-Check
run: |
apk add --no-cache curl
sleep 3
curl -sf https://1bis.hocks.eu/ > /dev/null
curl -sf https://1bis8.hocks.eu/ > /dev/null
echo "1 bis 8 Party antwortet – Deploy erfolgreich"