Skip to content

Deployment

Astrid Avalin Soerensen edited this page May 6, 2025 · 10 revisions

🌍 GitHub Pages Setup for Unity WebGL Deployment

To successfully deploy your Unity WebGL build to GitHub Pages using this CI/CD pipeline, make sure your repository’s GitHub Pages settings are configured like this:

Source:
Deploy from a branch

Branch:
gh-pages/ (root)

You can check this by going to:
Repository → Settings → Pages → Build and Deployment

Example setup (as shown in the screenshots):

  • Your site is live at: https://<your-username>.github.io/<your-repo>/
  • The gh-pages branch will be automatically updated by the CI pipeline.
  • You do not need to set up Jekyll or any static site generator.

Important:

  • The pipeline force-updates the gh-pages branch to contain only your Unity WebGL build files.
  • If you see the repository README or other files on your live site, it usually means:
    • The WebGL build folder was empty or misconfigured.
    • The deployment step failed to place the right files.
    • You need to double-check the publish_dir path in the workflow.

Example Setup

This what your pages settings page should look like.

image


Clone this wiki locally