diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..38a03bc --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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 diff --git a/README.md b/README.md index 4f4cb31..bf807e7 100644 --- a/README.md +++ b/README.md @@ -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/) diff --git a/index.html b/index.html index 408ed71..7e6ba2f 100644 --- a/index.html +++ b/index.html @@ -2,10 +2,10 @@
- + - -