after each publish — the script auto-loads it for updates.
Deploy script
Add to
package.json
:
{
"scripts"
:
{
"deploy"
:
"npm run build && ~/.agents/skills/here-now/scripts/publish.sh dist/"
}
}
For updates to an existing slug:
{
"scripts"
:
{
"deploy"
:
"npm run build && ~/.agents/skills/here-now/scripts/publish.sh dist/ --slug "
}
}
GitHub Pages Deployment (Alternative)
Use GitHub Pages when you need git-based deployment or already have a GitHub repo set up.
Prerequisites
GitHub CLI installed (
gh
)
Git repository initialized and pushed to GitHub
Quick Deploy
npm
run build
&&
npx gh-pages
-d
dist
Full Setup
Build the game
:
npm
run build
Ensure
vite.config.js
has the correct base path
if deploying to a subdirectory:
export
default
defineConfig
(
{
base
:
'//'
,
// ... rest of config
}
)
;
Deploy with GitHub CLI
:
gh repo create
<
game-name
>
--public
--source
=
.
--push
npm
install
-D
gh-pages
npx gh-pages
-d
dist
Enable GitHub Pages
in repo settings (should auto-detect the
gh-pages
branch).
Your game is live at:
https://.github.io//
Automated Deploys
Add to
package.json
:
{
"scripts"
:
{
"deploy"
:
"npm run build && npx gh-pages -d dist"
}
}
Play.fun Registration
After deploying, register your game on Play.fun for monetization. Use the
/game-creator:playdotfun
skill for integration details.
The deployed URL becomes your
gameUrl
when registering:
await
client
.
games
.
register
(
{
name
:
'Your Game Name'
,
gameUrl
:
'https://.here.now/'
,
// or GitHub Pages URL
maxScorePerSession
:
500
,
maxSessionsPerDay
:
20
,
maxCumulativePointsPerDay
:
5000
}
)
;
Other Hosting Options
Vercel
:
npx vercel --prod
(auto-detects Vite)
Netlify
Connect repo, set build command to
npm run build
, publish dir to
dist
Railway
Use the Railway skill for deployment
itch.io
Upload the
dist/
folder as an HTML5 game
Pre-Deploy Checklist
npm run build
succeeds with no errors
Test the production build with
npm run preview
Remove any
console.log
debug statements
Verify all assets are included in the build
Check mobile/responsive behavior if applicable
Set appropriate
and meta tags in
index.html