Recipes: static sites
These examples cover a new site and automatic deploys. Each recipe includes a command, its output, and a prompt for your agent. The output below came from rapadura in production.
Before you start, install the CLI and run rapadura login. See
Getting started. The examples use the site name
php-sobral-2026. Use your own name.
A new site in plain HTML
A folder with index.html at its root is a site. You need not install or
configure anything else.
site/
index.html
programacao.html
palestrantes/index.html
404.html
style.css
img/palco.png
rapadura publish ./site --site php-sobral-2026 --create --title "PHP Sobral 2026"
Packed 7 files (0.0 MB), uploading...
Created php-sobral-2026.rapadura.space
PHP Sobral 2026 is live at https://php-sobral-2026.rapadura.space (version 1).
live: https://php-sobral-2026.rapadura.space
version: 1 (7 files, 0.0 MB)
version url: https://php-sobral-2026--v1.rapadura.space
next: Open https://php-sobral-2026.rapadura.space to confirm the result.
next: Publish again to the same site to update it. Roll back any time with: rapadura rollback php-sobral-2026.rapadura.space 1
next: Version 1 keeps its own address for as long as it is retained: https://php-sobral-2026--v1.rapadura.space
What the server does with that folder:
programacao.htmlanswers at/programacaoand at/programacao.html.palestrantes/index.htmlanswers at/palestrantes/(and/palestrantesredirects there).404.htmlbecomes the "not found" page.- Images, CSS and JS are cached for a week. When you change one, change its
name too (
style.v2.css) if everyone must see it right away. HTML pages,.webmanifestfiles (served asapplication/manifest+json), and service workers (sw.js,service-worker.js) always answerCache-Control: no-cache, so updates reach visitors on the next visit.
View prompt
Build a one-page hotsite for PHP Sobral 2026 (November 14, Sobral, Ceará) in ./site: intro, schedule, speakers, and a sign-up button pointing at https://www.sympla.com.br/. Use plain HTML and CSS only, with no frameworks, secrets, or server-side scripts, and do not modify files outside ./site or any other rapadura site. Show me the planned files and ask for my confirmation before creating or publishing php-sobral-2026. If the slug is unavailable, access is denied, or a limit blocks publishing, stop and tell me what I need to change or grant. When confirmed, publish ./site with a request key, follow the operation, and report the confirmed live URL, version, and version URL from the receipt.The network badge
Every hotsite carries the "Powered by Rapadura Network" badge: rapadura's
caramel "r" and two lines of text, linking to https://rapadura.net. On
publish, the gateway appends the badge to the root index.html, right
before </body>, and its CSS in a <style id="rpd-badge"> in the
<head>. Only that page changes, only once, and only when it has </body>
and no .rpd-badge element yet; every other file stays byte for byte what
you sent. The default tone is light. For a dark footer, or to turn the
automatic badge off, say so in the <head>:
<meta name="rapadura-badge" content="dark">
<meta name="rapadura-badge" content="off">
The values are light, dark and off; anything else refuses the publish
saying what is accepted. To place the badge yourself, in your own footer,
use the snippet below (class rpd-badge--light or rpd-badge--dark) with
the network's stylesheet; with it on the page, the gateway adds no other.
<link rel="stylesheet" href="https://agents.rapadura.net/docs/badge.css">
<a class="rpd-badge rpd-badge--light" href="https://rapadura.net" target="_blank" rel="noopener">
<svg class="rpd-badge__mark" viewBox="0 0 64 64" aria-hidden="true" focusable="false"><rect width="64" height="64" rx="15" fill="#e8884a"/><path d="M25 23h14l5 18H20z" fill="#2b1a10" stroke="#2b1a10" stroke-width="6" stroke-linejoin="round"/></svg>
<span class="rpd-badge__text"><span class="rpd-badge__eyebrow">Powered by</span><span class="rpd-badge__name">Rapadura Network</span></span>
</a>
With a site generator
Run the build and publish the output directory, never the project root.
| tool | build | publish |
|---|---|---|
| Astro | npm run build |
./dist |
| Vite (React, Vue, Svelte) | npm run build |
./dist |
| Hugo | hugo |
./public |
| Eleventy | npx @11ty/eleventy |
./_site |
| Jekyll | bundle exec jekyll build |
./_site |
Next.js with output: 'export' |
npm run build |
./out |
npm run build && rapadura publish ./dist --site php-sobral-2026 --create
The site is served at the root of its hostname. If the generator asks for
the final address (site in Astro, baseURL in Hugo, url in Jekyll), use
https://php-sobral-2026.rapadura.space/ and leave base empty.
Publishing the repository root can include .env, keys, or .php files.
Rapadura refuses the publish and lists the files:
error (archive_forbidden_file): 2 file(s) cannot be published:
.env (credential-like file)
contato.php (server-side code is never executed on the static lane)
hint: publish a generated output directory that holds only the public files
There is no way to force it. Publish the output directory or remove the
files. .git, node_modules, vendor and .cache are skipped silently.
View prompt
Build this project and identify its generated static output directory (never the repository root). Tell me which output directory you will upload and ask for my confirmation before creating or publishing php-sobral-2026 on rapadura. Do not modify other sites, include .env or server-side files, or try to work around any refusal. If the build fails, rapadura refuses any file, or access/limits block the publish, stop and show me the exact error and list of files so I can fix or grant what is needed. Once confirmed, publish with a request key, follow the operation, and report the confirmed live URL and version from the receipt.Update, check, roll back
Publishing again to the same site makes a new version. -m stores a note.
rapadura publish ./site --site php-sobral-2026 -m "registration open"
rapadura versions php-sobral-2026
VERSION STATUS FILES SIZE BY WHEN URL MESSAGE
v2 live 7 0.0MB rtio 2026-10-13 11:54 https://php-sobral-2026--v2.rapadura.space registration open
v1 archived 7 0.0MB rtio 2026-10-13 11:54 https://php-sobral-2026--v1.rapadura.space
Every version keeps its own address (php-sobral-2026--v1.rapadura.space)
while it is retained. You can compare versions or show a version that is no
longer live.
If a publish breaks the site, roll back to the previous version. The switch is instant and atomic; it does not rebuild the site.
rapadura rollback php-sobral-2026 1
rapadura sites show php-sobral-2026
php-sobral-2026.rapadura.space
status: live
version: v1
owner: rtio
live: https://php-sobral-2026.rapadura.space
created: 2026-10-13 11:54
title: PHP Sobral 2026
To move forward again, run rollback with the newer version's number. The
last 20 versions are kept.
View prompt
The last publish of php-sobral-2026 broke the home page. List the retained versions of php-sobral-2026 on rapadura, tell me which version is currently live and which previous version you plan to restore, and ask for my confirmation before rolling back. Do not publish new code, delete anything, or change any other site. If there is no earlier retained version, access is denied, or the rollback fails or returns an uncertain result, stop and tell me what happened and who needs to act. After I confirm, run the rollback with a request key, follow the operation, and confirm the live version from the receipt and by checking the site.Redirects and the 404 page
A _redirects file at the site root, one rule per line:
source target [301|302]. Exact paths only, no wildcards (except the single
opt-in SPA fallback line /* /index.html 200, described below).
/inscricoes https://www.sympla.com.br/ 302
/2025/ / 301
curl -sI https://php-sobral-2026.rapadura.space/inscricoes | grep -iE '^(HTTP|location)'
HTTP/2 302
location: https://www.sympla.com.br/
_redirects itself is never served, and an invalid line refuses the publish
saying which one. For the error page, a 404.html at the root is enough.
Single-page apps (SPA routing)
For apps with client-side history routing (React, Vue, Svelte, Vite) where deep
links should serve index.html with 200, opt in by adding this exact rule to
_redirects at the root of the published directory (in Vite, place it in
public/_redirects so it lands in dist/_redirects):
/* /index.html 200
Without this line, unknown paths continue to return 404. You can combine it
with exact 301/302 rules, and it applies to both the live site and version
preview URLs. /* /index.html 200 is the only wildcard and only 200 rule
accepted, and it may appear at most once; any other wildcard, other 200
target/source, or duplicate line refuses the publish and names the exact line.
Precedence and missing assets:
- Existing files and exact
_redirectsrules win over the SPA fallback. - Missing files with static asset extensions (
.css,.js,.mjs,.map,.wasm,.webmanifest,.png,.jpg,.jpeg,.gif,.svg,.webp,.avif,.ico,.woff,.woff2,.ttf,.otf,.mp4,.webm,.pdf,.json,.xml,.txt) return404(serving404.htmlif present) instead ofindex.html, so broken scripts or source maps never come back as HTML. - Hidden paths (
/.), forbidden script extensions (.php, etc.), and/_redirectsalways return404.
Take a site offline and bring it back
rapadura sites delete php-sobral-2026 --yes
php-sobral-2026.rapadura.space is offline. Files are kept for a while; bring it back with: rapadura sites restore php-sobral-2026.rapadura.space
Visitors get 410 Gone, and the name stays reserved for you. To restore the
site:
rapadura sites restore php-sobral-2026
php-sobral-2026.rapadura.space is back online at https://php-sobral-2026.rapadura.space (status live, version v1).
The site comes back with the version that was live and all its history.
View prompt
I want to take php-sobral-2026 offline on rapadura. First check its current status and this agent's permissions, explain that deletion returns 410 Gone while keeping files until the platform owner purges them, and ask for my confirmation before deleting it. Do not touch any other site, and do not attempt to purge the site. If access is denied or the operation fails, stop and tell me what permission or action is needed. After I confirm, delete php-sobral-2026 with a request key, follow the operation, and report the confirmed offline status and how to restore it.View prompt
Restore my deleted php-sobral-2026 hotsite on rapadura if its retained files still exist and this agent has permission. Use a request key and do not recreate a missing site, publish new code, or change any other site. If the site was already purged (not_found), access is denied, or the operation fails, stop and tell me the exact error and what I or the administrator need to do. Follow the operation and report the confirmed live URL and version from the receipt.Your own domain
A static hotsite can also answer at a domain the event owns, like
www.phpsobral.com.br. Ask for it; the request waits for the owner's
approval and tells you which DNS record to create meanwhile:
rapadura domain add php-sobral-2026 www.phpsobral.com.br --reason "event domain, registered by the organizers"
Request #2 (domain.add www.phpsobral.com.br → php-sobral-2026.rapadura.space) is waiting for the owner's approval.
next: Point www.phpsobral.com.br at 168.196.105.251 (A record, DNS-only, not proxied through a CDN at least until the certificate exists) — the certificate is issued automatically on first visit after approval.
next: Nothing changes until the owner approves; the site keeps answering at https://php-sobral-2026.rapadura.space.
next: The owner decides at https://agents.rapadura.net/approvals or with: rapadura approvals approve 2
next: Undecided, the request expires on 2026-10-20. Follow it with: rapadura approvals
Before the owner approves, publish the _rapadura-verify.<domain> TXT record
(rapadura-verify=<token>) shown in the request; you can remove it afterwards.
Set the A record to DNS-only (not proxied through a CDN) at least until the
certificate is issued, otherwise the proxy intercepts HTTPS validation and
causes redirect loops. When the sole owner files a request from the CLI, R-AUTH-4
refuses the filing token so the browser /approvals page is the intended
single-machine approval route (or another machine's login).
Follow it with rapadura approvals; once approved, rapadura domain list php-sobral-2026 shows the domain. rapadura domain remove detaches it with
no approval. The rules (which names are refused) are in
Rules and limits.
View prompt
Check my access and existing domains for the php-sobral-2026 hotsite, then ask for my confirmation on the target site, domain (www.phpsobral.com.br), and reason before submitting a custom-domain request on rapadura. Do not remove any existing domain, change any other site, try to approve the request, or claim the domain is live before approval. If access is denied or the domain is refused, stop and tell me why and who can act. After submitting, report the request number, the exact DNS records from the receipt (including the _rapadura-verify TXT verification record and the A record I must create), and how I can follow the request until the owner approves.Other zones
New sites are created under rapadura.space. A site created earlier under
rapadura.net or phpcomrapadura.org keeps its address: name it in full
(--site php-sobral-2025.phpcomrapadura.org) to publish, roll back or
inspect it. A new name in another zone is refused. rapadura zones lists the
zones and your limits.
Watch the traffic
rapadura logs php-sobral-2026 -n 20
Each line is JSON with time, path, status, size and browser. With jq, the
most viewed pages among the last 2000 requests:
rapadura --json logs php-sobral-2026 -n 2000 \
| jq -r '.lines[] | fromjson | .uri' | sort | uniq -c | sort -rn | head
View prompt
Read the last 2000 access log lines for php-sobral-2026 on rapadura and report the most visited pages, how many 404 responses occurred, and which paths returned 404. Use read-only calls only; do not change the site, add redirects, inspect other sites, or print credentials. If access is denied or the logs cannot be read, stop and tell me the exact error and who can fix or grant access.Publish on every push (GitHub Actions)
Mint a scoped agent token for CI, one per repository (rapadura agent create --name gh-actions --apps php-sobral-2026.rapadura.space --actions site.read,site.publish --ttl 90d). Save it as the RAPADURA_TOKEN secret
in the repository. Never reuse your computer's login token and never put a
token in a project file.
Agent tokens expire in at most 90 days (--ttl 90d). When the token expires,
the Publish step fails with an authentication error while the previous live
version stays up; mint a replacement with the same rapadura agent create
command and update the RAPADURA_TOKEN secret in the repository.
With npm:
# .github/workflows/publish.yml
name: publish
on:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: rapadura-publish
cancel-in-progress: false
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci && npm run build
- name: Install the rapadura CLI
run: |
curl -fsSL https://agents.rapadura.net/install.sh | sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Publish
run: rapadura publish ./dist --site php-sobral-2026 -m "commit ${GITHUB_SHA::7}"
env:
RAPADURA_TOKEN: ${{ secrets.RAPADURA_TOKEN }}
With pnpm:
# .github/workflows/publish.yml
name: publish
on:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: rapadura-publish
cancel-in-progress: false
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Install the rapadura CLI
run: |
curl -fsSL https://agents.rapadura.net/install.sh | sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Publish
run: rapadura publish ./dist --site php-sobral-2026 -m "commit ${GITHUB_SHA::7}"
env:
RAPADURA_TOKEN: ${{ secrets.RAPADURA_TOKEN }}
concurrency (cancel-in-progress: false) queues back-to-back pushes so they
do not publish out of order, and workflow_dispatch lets you run a publish
again from GitHub without pushing a new commit. If the publish fails, the step
fails and the previous version stays live.
More prompts to try
View prompt
List the hotsites this agent can access on rapadura, showing each site's address, status, live version, and last publish date, and identify which ones have not been published to in more than 30 days. Read only: do not publish, delete, or change any site, and never print credentials. If access is denied or a site's version history is unavailable, stop and tell me what is missing and who can grant it.View prompt
Update only the schedule section of php-sobral-2026 from programacao.csv (columns: time, title, speaker), keeping the rest of the site unchanged. Show me the diff and ask for my confirmation before publishing. Do not modify any other site or include secrets or server-side scripts. If programacao.csv is missing or malformed, or if access, limits, or file checks block the publish, stop and tell me what needs fixing or granting. Once I confirm, publish with a request key and the message "schedule updated", follow the operation, and report the confirmed live URL and version from the receipt.