feat(pages): deploy

This commit is contained in:
tiennm99 committed 2025-04-26 23:16:12 +07:00
1 parent 361f558e19
commit 40fe7bc1b7
4 files changed
+91 -12

No files matched your search

+50
View File
@@ -0,0 +1,50 @@
name: Deploy to GitHub Pages
on:
push:
branches:
- main # Set this to your default branch
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build-and-deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
+31 -2
View File
@@ -1,2 +1,31 @@
# sokoban
A simple sokoban game generated with AI
# Sokoban
A simple Sokoban game built with Phaser 3 and Vite.
## Description
This is a browser-based implementation of the classic Sokoban puzzle game, built using Phaser 3 game framework and Vite as the build tool.
## Development
To run the development server:
```bash
npm install
npm run dev
```
## Building
To build the project for production:
```bash
npm install
npm run build
```
## Deployment
This project is automatically deployed to GitHub Pages when changes are pushed to the main branch.
You can access the deployed game at: [https://tiennm99.github.io/sokoban/](https://tiennm99.github.io/sokoban/)
+3 -3
View File
@@ -2,10 +2,10 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/favicon.png" />
<link rel="icon" type="image/png" href="./favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/style.css">
<title>Phaser - Template</title>
<link rel="stylesheet" href="./style.css">
<title>Sokoban - A Phaser Game</title>
</head>
<body>
+7 -7
View File
@@ -1,19 +1,19 @@
{
"name": "template-vite",
"description": "A Phaser 3 template using Vite.",
"version": "1.4.0",
"name": "sokoban",
"description": "A simple Sokoban game built with Phaser 3 and Vite",
"version": "1.0.0",
"type": "module",
"repository": {
"type": "git",
"url": "git+https://github.com/phaserjs/template-vite.git"
"url": "git+https://github.com/tiennm99/sokoban.git"
},
"author": "Phaser Studio <support@phaser.io> (https://phaser.io/)",
"author": "tiennm99",
"license": "MIT",
"licenseUrl": "http://www.opensource.org/licenses/mit-license.php",
"bugs": {
"url": "https://github.com/phaserjs/template-vite/issues"
"url": "https://github.com/tiennm99/sokoban/issues"
},
"homepage": "https://github.com/phaserjs/template-vite#readme",
"homepage": "https://tiennm99.github.io/sokoban/",
"scripts": {
"dev": "node log.js dev & vite --config vite/config.dev.mjs",
"build": "node log.js build & vite build --config vite/config.prod.mjs",