Do it yourself
#- Open the project and choose Publish at the top of the editor. You can also open the project menu (☰ and the project name, at the top left) and choose Publish….
- Read the Publish tab. Before its first publish, a static site says where it goes live: "Publishing v3. This becomes the live version at 12345.playcode.site." A Cloud app that has never been published shows Custom Subdomain: type a name, or leave it empty and Playcode picks the address.
- Choose Publish. On a static site that is already live, the button says Publish update.
- Wait for the result. A static site shows "Your site is on the internet." the first time, and "Your website has been published." after that. A Cloud app opens the Deployment window. Its first publish goes through Creating your app, Starting up, Building & publishing and Final checks, and ends with "Your site is on the internet." A later publish starts with Saving a backup and Pushing your changes, and ends with "Your app is live".
- Open the address to check the site. Once the project is live, the Publish tab shows its address at the top.
To change the site later, ask the agent for the change, check it in the preview, then publish again.
If it doesn't work
#"The build failed"
#The static site's code has an error, and the window shows it under "Make sure your project code is correct and works - the error is below." Ask the agent to fix the error, then choose Publish again. See A build or publish failed.
"Publish failed"
#The Cloud app's publish stopped at a step. The Deployment window shows What went wrong and opens Build details with the log. If the app was live before, it stays on the previous version: "We rolled back to your previous version, so your site stays up." Ask the agent to read the log and fix the cause, then publish again.
"This workspace is based on older history than the published version"
#The code on the development computer is older than the live version, so publishing would roll the app back. Production was not changed. Ask the agent to reconcile the two histories, then publish again. The message "This workspace and the published version each have changes the other doesn't" has the same fix.
The new address does not open
#After you change a static site's address, the site answers at it only after the next publish. Choose Publish update. See Your Playcode address.
Limits
#- On the Free plan, a static site shows a "Built with Playcode" banner, and you cannot choose the name in its address. Pro and Max remove the banner and let you choose the name. See Bandwidth and limits.
- Cloud apps need a Pro or Max plan. See Run a Cloud app.
- Each file of a static site has a size limit, and a larger file is left out of the published site. See Bandwidth and limits.
- Each publish saves a checkpoint by itself: a static site saves the version it publishes, a Cloud app saves its production computer before the change. Only the newest of these are kept. See Undo and checkpoints and Snapshots and rollback.
- Only the project's creator, or an Admin of the project or its workspace, can publish and unpublish.
- Publishing does not share the project's code or chat. Sharing is a separate control: see Share a project.