Deploying to GitHub Pages

Your game works locally. Now let’s put it on the internet so you can share it with friends. We will use GitHub Pages, just like we did for the WakeUp Times app.

Disabling Jekyll

Recall that GitHub Pages uses Jekyll by default, but we do not need it. The starter code already includes an empty .nojekyll file to tell GitHub to serve our files directly. If you started from scratch, create this file in the root of your repository:

Pushing Your Code

Make sure all your changes are committed and pushed:

git push

Enabling GitHub Pages

Following the same steps as in the WakeUp Times app:

  1. Go to your repository on GitHub
  2. Click Settings (the tab near the top)
  3. In the left sidebar, click Pages
  4. Under “Source”, select your default branch (usually main)
  5. Click Save

GitHub will start building your site. Watch the progress in the Actions tab. Look for a workflow called “pages build and deployment”.

Viewing Your Deployed Game

Once the build completes (green checkmark in Actions), go back to SettingsPages. You will see your site’s URL:

https://your-username.github.io/rock-paper-scissors-app/

Click the link. Your game is now live at that URL, and you can send the URL to anyone you want to share it with.

Making Updates

Whenever you push changes to the main branch, GitHub automatically rebuilds your site. Changes typically appear within a minute or two.

Checkpoint: Your final commit was already made above. Verify your game is live at the GitHub Pages URL.