Publish a multi-file site
publish_filesPublishes several files at once to an existing site (use create_site first for a new one). Send index.html plus any other files: css/style.css, js/app.js, about.html, images or fonts. index.html becomes the page (previous version kept in history); all other files go to assets/ with their folders kept, and relative links in index.html are rewritten to assets/ automatically, so write normal relative paths like "css/style.css". Text files: put the code in content. Binary files (png, jpg, webp, woff2…): content is base64 and encoding is "base64". Omit index.html to only add or replace files. Limits: 300 files, 10 MB per file, 20 MB in total, the account storage limit. Allowed: html, css, js, json, images (jpg, png, gif, svg, webp, avif, ico), fonts (woff, woff2, ttf, otf), txt, xml, pdf. Use dry_run=true to preview.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | Site id or name, e.g. "my-portfolio" or "my-portfolio.hostilo.page" (from list_sites). | |
| files | Yes | Files to publish. | |
| dry_run | No | Only report what would be published; nothing is changed. | |
| clear_assets | No | Delete all current files in assets/ before publishing. | |
| expected_version | No | Optional: the version from get_site. If the site was saved by someone else since then, nothing is published and you get a version_conflict error (get the site again and merge). |