This guide explains how to deploy the Alien Invaders game to GitHub Pages.
cd godot
./deploy.shThis script will:
- Export the game to HTML5
- Save it to the
/docsfolder - Commit changes to git
- Push to GitHub
Your game will be live at: https://lex3001.github.io/AlienInvaders/
The repository includes a GitHub Actions workflow that automatically:
- Exports the game whenever you push changes to
godot/folder - Commits the build to
/docsfolder - Publishes to GitHub Pages
No action needed! Just push your changes and the deployment happens automatically.
If not already configured:
- Go to your repository Settings → Pages
- Under "Source", select:
- Branch:
main - Folder:
/docs
- Branch:
- Click "Save"
Your site will be published at: https://lex3001.github.io/AlienInvaders/
If you prefer to export manually:
- Open Godot and load the project
- Go to Project → Export
- Select the "Web" preset (pre-configured)
- Click "Export Project"
- Export to
/docs/index.html - Commit and push:
git add docs/ git commit -m "Deploy: Updated web build" git push origin main
ls -la godot/deploy.sh # Check if file exists
chmod +x godot/deploy.sh # Make sure it's executableMake sure Godot is installed and in your PATH:
which godot
godot --versionCheck the workflow status:
- Go to Actions tab in GitHub
- Click the failed workflow
- View logs for error details
- Check that files are actually in
/docsfolder - Clear your browser cache
- Wait a few seconds for GitHub Pages to rebuild
godot/export_presets.cfg- HTML5 export configurationgodot/deploy.sh- One-click deploy script.github/workflows/deploy.yml- Automatic deployment workflow
Before deploying, test the web build locally:
cd docs
# Start a local web server
python3 -m http.server 8000Then visit: http://localhost:8000