Loading...
Loading...
Deploy browser games to GitHub Pages or other hosting. Use when deploying a game, setting up hosting, or publishing a game build.
npx skill4agent add opusgamelabs/game-creator game-deployghnpm run build && npx gh-pages -d distnpm run buildvite.config.jsexport default defineConfig({
base: '/<repo-name>/',
// ... rest of config
});gh repo create <game-name> --public --source=. --push
npm install -D gh-pages
npx gh-pages -d distgh-pageshttps://<username>.github.io/<repo-name>/package.json{
"scripts": {
"deploy": "npm run build && npx gh-pages -d dist"
}
}/game-creator:playdotfungameUrlawait client.games.register({
name: 'Your Game Name',
gameUrl: 'https://<username>.github.io/<repo-name>/',
maxScorePerSession: 500,
maxSessionsPerDay: 20,
maxCumulativePointsPerDay: 5000
});npx vercel --prodnpm run builddistdist/npm run buildnpm run previewconsole.log<title>index.html