Get started
Publishing with GitHub Actions
Set up the Open Cloud API key and repository secrets so every push to main publishes your place.
boilerplate/.github/workflows/publish.yml compiles the game, builds game.rbxl with Rojo, and uploads it with the Open Cloud Place Publishing API. It runs on every push to main, and you can run it by hand from the Actions tab (workflow_dispatch).
What the workflow does
npm ci, thennpm run build.- Downloads the Rojo version pinned in
rokit.tomland runsrojo build -o game.rbxl. - Posts the file to Roblox:
response=$(curl --fail-with-body -sS -X POST \
"https://apis.roblox.com/universes/v1/${UNIVERSE_ID}/places/${PLACE_ID}/versions?versionType=Published" \
-H "x-api-key: ${ROBLOX_API_KEY}" \
-H "Content-Type: application/octet-stream" \
--data-binary @game.rbxl)
versionType=Published means the upload goes live. If any of the three secrets is missing, the job stops with "Set the ROBLOX_API_KEY, UNIVERSE_ID and PLACE_ID repository secrets first."
The workflow uses concurrency: group: publish with cancel-in-progress: false, so two quick pushes publish one after the other.
Set it up
1. Create the API key
- Go to create.roblox.com/dashboard/credentials and click Create API Key.
- Under Access Permissions, add the universe-places API system.
- Choose your experience and give it Write access.
- Under Security, either leave the allowed IP list open or add
0.0.0.0/0. GitHub's hosted runners don't have fixed IP addresses. - Save and copy the key.
2. Add the repository secrets
In your GitHub repo, go to Settings > Secrets and variables > Actions and add three repository secrets:
| Secret | Where it comes from |
|---|---|
ROBLOX_API_KEY |
The key from step 1 |
UNIVERSE_ID |
On the Creator Dashboard, open the experience, click the "..." menu and choose Copy Universe ID |
PLACE_ID |
The number in your game's URL on roblox.com |
3. Push to main
The run shows "Roblox replied: ..." with the new version number when it works.
Things to know
Publishing replaces the whole place. The upload is whatever default.project.json builds: your compiled code, the Baseplate and the SpawnLocation. Anything you built by hand in Studio that isn't in the repo is gone from the live place after the next publish. If you build your map in Studio, save it as a model file (.rbxm) in the repo and add it to default.project.json, or publish from Studio and don't use this workflow.
Point the secrets at the live experience. Your Studio test place (see Install and first run) is a separate experience with its own universe and place IDs. The secrets decide which one the workflow publishes to.
Rolling back. Every publish is a new place version. To undo one, open the place's Version History on the Creator Dashboard and restore the previous version.