> ## 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.

# Github Pages에 게임 호스팅하기

> Github Pages를 사용해 게임을 무료로 호스팅하세요

Solana.Unity SDK는 WebGL과 완전히 호환됩니다. 이 튜토리얼에서는 Solana.Unity-SDK [데모 씬](https://garbles-labs.github.io/Solana.Unity-SDK/)을 빌드하고, [Github Pages](https://pages.github.com/)를 사용해 배포합니다.

GitHub Pages를 사용하면 GitHub가 여러분의 저장소에서 직접 웹페이지를 호스팅할 수 있습니다.

## 게임을 WebGL로 빌드하기

1. [Unity](https://unity3d.com/get-unity/download)를 다운로드하고 설치합니다
2. [설치 안내](https://github.com/garbles-labs/Solana.Unity-SDK#installation)에 따라 Solana.Unity-SDK를 설치하고 예제를 임포트합니다
3. 씬을 WebGL로 빌드합니다(GH Pages는 압축 파일 제공을 지원하지 않으므로 반드시 [압축을 비활성화](https://www.youtube.com/watch?v=2jjESP58jsA)하세요)
   <img src="https://mintlify.s3.us-west-1.amazonaws.com/magicblock-42/images/webgl.png" alt="" />

<Card title="빌드 단계 건너뛰기" icon="lightbulb" iconType="duotone">
  빌드 단계를 건너뛰고 싶다면 SDK 저장소를 fork하면 됩니다.
  해당
  [gp-pages](https://github.com/garbles-labs/Solana.Unity-SDK/tree/gh-pages)
  브랜치에는 미리 빌드된 WebGL 버전이 포함되어 있습니다
</Card>

## Github Pages에 데모 호스팅하기

* 새 저장소를 만듭니다
* `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>
```

* 이제 저장소는 SDK의 [gp-pages](https://github.com/garbles-labs/Solana.Unity-SDK/tree/gh-pages) 브랜치와 비슷한 모습이어야 합니다
* 저장소 설정에서 gh-pages 배포를 활성화합니다
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/magicblock-42/ko/pages/tools/solana-unity-sdk/guides/images/gh-pages-deply.png" alt="" />

Github는 실제 배포용 URL을 제공합니다: [garbles-labs.github.io/Solana.Unity-SDK](https://garbles-labs.github.io/Solana.Unity-SDK/)

<Card title="커스텀 도메인" icon="lightbulb" iconType="duotone">
  Github Pages에서 [커스텀 도메인](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site)을 설정하는 방법을 알아보세요
</Card>

<Card title="게임을 xNFT로 배포하기" icon="lightbulb" iconType="duotone">
  [이 가이드](/Build/SolanaUnitySDK/guides/publishing-a-game)를 따르면 2분 안에 게임을 xNFT로 배포할 수 있습니다.
</Card>

즐거운 게임 개발 되시길 바랍니다. 저장소에 ⭐도 잊지 마세요
