Add info for puterjs deployments (#3202)

* Add info for puterjs deployments

* update external links

* hide github actions method
This commit is contained in:
Reynaldi Chernando
2026-06-04 01:25:57 +07:00
committed by GitHub
parent 5b8e41e66d
commit bd1dcde7b0
3 changed files with 140 additions and 0 deletions
+57
View File
@@ -139,3 +139,60 @@ You can see various Puter.js workers management features in action from the foll
- [Get a worker](/playground/workers-get/)
- [Workers Management](/playground/workers-management/)
- [Authenticated Worker Requests](/playground/workers-exec/)
## Deployment
Once your worker is ready, you can put it online on a free `*.puter.work` subdomain. You can publish it manually in a few clicks, or automatically from your GitHub repository.
### Publish from puter.com
The quickest way to publish a worker is to create it on [puter.com](https://puter.com) and publish it.
1. Create a `.js` file containing your worker code.
<figure style="margin: 30px 0;">
<img src="https://developer.puter.com/assets/img/workers/code.webp" style="width: 100%; max-width: 600px; margin: 0 auto; display: block; border-radius: 6px;">
</figure>
2. Right-click the file and choose **Publish as Worker**.
<figure style="margin: 30px 0;">
<img src="https://developer.puter.com/assets/img/workers/publish-workers.webp" style="width: 100%; max-width: 600px; margin: 0 auto; display: block; border-radius: 6px;">
</figure>
3. Pick a name and click **Publish**. Your worker is live at `https://your-worker.puter.work`.
<figure style="margin: 30px 0;">
<img src="https://developer.puter.com/assets/img/workers/published.webp" style="width: 100%; max-width: 600px; margin: 0 auto; display: block; border-radius: 6px;">
</figure>
<!-- ### Automate with GitHub Actions
If your worker's code lives on GitHub, you can redeploy it automatically on every push using the [Puter Worker Deploy Action](https://github.com/HeyPuter/puter-worker-deploy-action).
Add a workflow file at `.github/workflows/deploy-worker.yml`:
```yaml
name: Deploy Worker to Puter
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy worker
uses: HeyPuter/puter-worker-deploy-action@v1
with:
worker_name: my-api # publishes to my-api.puter.work
source_path: worker # the folder containing your worker
entry_file: index.js # the worker's entry file
puter_path: ~/workers/my-api # where to store the files on Puter
puter_token: ${{ secrets.PUTER_TOKEN }}
```
<div class="info">Store your Puter auth token as a GitHub Actions secret named <code>PUTER_TOKEN</code>. See the <a href="https://github.com/HeyPuter/puter-worker-deploy-action">action's README</a> for how to obtain a token and for the full list of options.</div> -->
+78
View File
@@ -0,0 +1,78 @@
---
title: Deployments
description: Deploy your Puter.js app anywhere, or host your website directly on Puter.
---
Now that you've integrated Puter.js into your app, the next step is getting it online.
Puter.js is a regular JavaScript library, so your app deploys like any other website. You can ship it to any hosting platform you already use, or host it directly on [Puter](https://puter.com).
## Deploy anywhere
Because Puter.js runs entirely on the client, there's no special backend to provision. Build your app as you normally would and deploy the output to any static or web hosting provider, such as <a href="https://vercel.com" rel="nofollow">Vercel</a>, <a href="https://pages.cloudflare.com" rel="nofollow">Cloudflare Pages</a>, <a href="https://www.netlify.com" rel="nofollow">Netlify</a>, or <a href="https://pages.github.com" rel="nofollow">GitHub Pages</a>.
No extra configuration is required. Your app keeps talking to Puter's services from the browser, wherever it's hosted.
## Deploy to Puter
Puter can also host your website for you, on a free `*.puter.site` subdomain. You can publish it manually in a few clicks, or automatically from your GitHub repository.
### Publish from puter.com
The quickest way to publish a website is to upload it on [puter.com](https://puter.com) and publish it.
1. Right-click on the desktop and create a new folder for your website's files.
<figure style="margin: 30px 0;">
<img src="https://developer.puter.com/assets/img/free-hosting/create-directory.webp" style="width: 100%; max-width: 600px; margin: 0 auto; display: block; border-radius: 6px;">
</figure>
2. Open the folder, right-click inside it, and choose **Upload Here** to upload your website's files (your `index.html` and any other assets).
<figure style="margin: 30px 0;">
<img src="https://developer.puter.com/assets/img/free-hosting/upload-here.webp" style="width: 100%; max-width: 600px; margin: 0 auto; display: block; border-radius: 6px;">
</figure>
3. Right-click the folder and choose **Publish as Website**.
<figure style="margin: 30px 0;">
<img src="https://developer.puter.com/assets/img/free-hosting/publish-website.webp" style="width: 100%; max-width: 600px; margin: 0 auto; display: block; border-radius: 6px;">
</figure>
4. Pick a subdomain and click **Publish**. Your site goes live instantly at `https://your-subdomain.puter.site`.
<figure style="margin: 30px 0;">
<img src="https://developer.puter.com/assets/img/free-hosting/published.webp" style="width: 100%; max-width: 600px; margin: 0 auto; display: block; border-radius: 6px;">
</figure>
<!-- ### Automate with GitHub Actions
If your code lives on GitHub, you can redeploy your site automatically on every push using the [Puter Subdomain Deploy Action](https://github.com/HeyPuter/puter-subdomain-deploy-action).
Add a workflow file at `.github/workflows/deploy.yml`:
```yaml
name: Deploy to Puter
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy website
uses: HeyPuter/puter-subdomain-deploy-action@v1
with:
subdomain: my-site # publishes to my-site.puter.site
source_path: dist # the folder to deploy (e.g. your build output)
puter_path: ~/sites/my-site # where to store the files on Puter
puter_token: ${{ secrets.PUTER_TOKEN }}
```
<div class="info">Store your Puter auth token as a GitHub Actions secret named <code>PUTER_TOKEN</code>. See the <a href="https://github.com/HeyPuter/puter-subdomain-deploy-action">action's README</a> for how to obtain a token and for the full list of options.</div>
If your project has a build step, run it before the deploy step (for example `npm ci && npm run build`) and point `source_path` at the build output. -->
+5
View File
@@ -28,6 +28,11 @@ let sidebar = [
source: '/frameworks.md',
path: '/frameworks',
},
{
title: 'Deployments',
source: '/deployments.md',
path: '/deployments',
},
{
title: 'Examples',
source: '/examples.md',