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,46 @@
name: Deploy Feature
on:
push:
branches:
- feature-*
jobs:
deploy-feature:
runs-on: pusher
container:
volumes:
- /repos:/repos
- /www/jeopardy-test:/www/jeopardy-test
steps:
- name: Install Node.js and npm
run: |
set -e
apk add --no-cache nodejs npm
node -v
npm -v
- name: Build app (feature)
run: |
set -euo pipefail
BRANCH="${GITHUB_REF_NAME:-}"
if [ -z "$BRANCH" ] && [ -n "${GITHUB_REF:-}" ]; then
BRANCH="${GITHUB_REF#refs/heads/}"
fi
if [ -z "$BRANCH" ]; then
echo "Unable to determine branch name."
exit 1
fi
cd /repos/music-jeopardy
git fetch origin "$BRANCH"
git checkout -B "$BRANCH" "origin/$BRANCH"
npm ci --include=dev
npm run generate:data
npm run build
- name: Deploy static files to test
run: |
set -euo pipefail
mkdir -p /www/jeopardy-test
find /www/jeopardy-test -mindepth 1 -maxdepth 1 -exec rm -rf {} +
cp -r /repos/music-jeopardy/dist/. /www/jeopardy-test/