Compare commits

...

2 Commits

Author SHA1 Message Date
843abdf4f1 update for autodeploy feature.
All checks were successful
Build / build (push) Successful in 2m12s
2025-10-16 10:31:54 -05:00
8f224f7350 update build.yml 2025-10-16 10:30:44 -05:00
2 changed files with 17 additions and 4 deletions

View File

@ -17,12 +17,24 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Run build
- name: Build
run: npm run build
env:
NODE_OPTIONS: "--max-old-space-size=2048"
NODE_OPTIONS: '--max-old-space-size=2048'
- name: Extract hostname from package.json
id: get-hostname
run: |
HOSTNAME=$(node -p "require('./package.json').deployHostname")
echo "hostname=$HOSTNAME" >> $GITHUB_OUTPUT
- name: Deploy to nginx
run: |
rm -rf /var/www/localhost/space/*
cp -r dist/* /var/www/localhost/space/
DEPLOY_PATH="/var/www/localhost/${{ steps.get-hostname.outputs.hostname }}"
# Create directory if it doesn't exist
mkdir -p "$DEPLOY_PATH"
# Copy built files (overwrite existing)
cp -r dist/* "$DEPLOY_PATH/"
echo "Deployed to $DEPLOY_PATH"

View File

@ -1,5 +1,6 @@
{
"name": "space-game",
"deployHostname": "space.digital-experiment.com",
"private": false,
"version": "0.0.1",
"type": "module",