> ## Documentation Index
> Fetch the complete documentation index at: https://docs.magicblock.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Host Your Game on Github Pages

> Host your game for free using Github pages

Solana.Unity SDK is fully compatible with WebGL. In this tutorial you will compile the Solana.Unity-SDK [demo scene](https://garbles-labs.github.io/Solana.Unity-SDK/) and publish it using [Github pages](https://pages.github.com/).

With GitHub pages, GitHub allows you to host a webpage from your repository.

## Compile the game to WebGL

1. Download and Install [Unity](https://unity3d.com/get-unity/download)
2. Install the Solana.Unity-SDK following the [instructions](https://github.com/garbles-labs/Solana.Unity-SDK#installation) and import the example
3. Compile the scene to WebGL (be sure to [disable compression](https://www.youtube.com/watch?v=2jjESP58jsA), as GH pages does not support serving compressed files)
   <img src="https://mintlify.s3.us-west-1.amazonaws.com/magicblock-42/images/webgl.png" alt="" />

<Card title="Skip the compilation step" icon="lightbulb" iconType="duotone">
  If you want to skip the compilation step, you can fork the SDK repository,
  which contained a pre-compiled WebGL build in the
  [gp-pages](https://github.com/garbles-labs/Solana.Unity-SDK/tree/gh-pages)
  branch
</Card>

## Host the demo on Github pages

* Create a new repository
* Navigate to the build folder containing the index.html

```shell theme={null}
git init
git add .
git commit -m "WebGL game"
git remote add origin <remote_repo_url>
git push origin <branch>
```

* You repository should now looks similar to the SDK [gp-pages](https://github.com/garbles-labs/Solana.Unity-SDK/tree/gh-pages) branch.
* Enable gh-pages deployment from the repository settings
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/magicblock-42/pages/tools/solana-unity-sdk/guides/images/gh-pages-deply.png" alt="" />

Github will provide a url for the live deployment: [garbles-labs.github.io/Solana.Unity-SDK](https://garbles-labs.github.io/Solana.Unity-SDK/)

<Card title="Custom domain" icon="lightbulb" iconType="duotone">
  Learn how to setup a [custom
  domain](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site)
  on Github pages
</Card>

<Card title="Publish your game as xNFT" icon="lightbulb" iconType="duotone">
  Follow [this guide](/Build/SolanaUnitySDK/guides/publishing-a-game) to publish your game as an xNFT
  in less than 2 minutes.
</Card>

Happy game development 🎈 and don't forget to ⭐ the repo
