Init multiplayer
All checks were successful
Deploy Feature / deploy-feature (push) Successful in 28s

This commit is contained in:
Johnny322
2026-02-24 20:54:14 +01:00
parent 6dde7eedb6
commit 9945f8163e
14 changed files with 2027 additions and 53 deletions

View File

@@ -0,0 +1,49 @@
name: Deploy Master
on:
push:
branches:
- master
jobs:
deploy-master:
runs-on: pusher
container:
volumes:
- /repos:/repos
- /www/jeopardy:/www/jeopardy
steps:
- name: Install Node.js and npm
run: |
set -e
apk add --no-cache nodejs npm
node -v
npm -v
- name: Build app (master)
run: |
set -euo pipefail
cd /repos/music-jeopardy
git fetch origin master
git checkout -B master origin/master
npm ci --include=dev
npm run generate:data
npm run build
- name: Deploy static files to production
run: |
set -euo pipefail
mkdir -p /www/jeopardy
find /www/jeopardy -mindepth 1 -maxdepth 1 -exec rm -rf {} +
cp -r /repos/music-jeopardy/dist/. /www/jeopardy/
- name: Restart realtime service (if available)
run: |
set -e
if command -v systemctl >/dev/null 2>&1; then
systemctl daemon-reload
systemctl enable --now music-jeopardy-realtime.service
systemctl restart music-jeopardy-realtime.service
else
echo "systemctl not available in this runner container. Restart on host manually."
fi