Init multiplayer
All checks were successful
Deploy Feature / deploy-feature (push) Successful in 28s
All checks were successful
Deploy Feature / deploy-feature (push) Successful in 28s
This commit is contained in:
46
.gitea/workflows/on-push-feature.yml
Normal file
46
.gitea/workflows/on-push-feature.yml
Normal 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/
|
||||
Reference in New Issue
Block a user