Deploy
What goes up
You upload built output: a directory, or a .tar.gz or .tgz archive of one. Other archive formats are rejected. You build on your own machine or CI runner, and source code never reaches the service.
A directory deploy uploads the top-level .well-known/ directory, without the names inside it that start with a dot, and leaves out every other name that starts with a dot, at any depth. What it leaves out is never uploaded, so it does not count toward the deploy size and file limits. See kamakiri deploy.
An archive deploy publishes the files inside the archive’s top-level .well-known/ directory, such as .well-known/security.txt, and leaves out every other name that starts with a dot, at any depth. The files it leaves out still count toward the deploy size and file limits.
Each deploy is an immutable snapshot, and a rollback puts an earlier one back online without uploading anything.
kamakiri deploy returns once every cache a visitor could hit serves the new deploy. kamakiri deploy covers the wait, --no-wait and the exit codes.
Default limits
- Sites. Five per account. Deleting a site frees its slot.
- Deploy size. 100 MB, the uncompressed size of one deploy’s files.
- Files per deploy. 20,000.
- Retained deploys. Five per site.
A deploy over the size or file limit is rejected, and nothing is stored. A deploy is never rejected for the retained count: once a site holds more than five, the oldest are deleted, never the one being served. kamakiri status shows the sites and retained deploys you use against their limits, and the deploy size limit.
Roll back
kamakiri deploys lists the retained deploys, newest first, and marks the one being served live. Only these can be rolled back to.
$ kamakiri deploys
ID Status Created
20261008-090512-739 live 2026-10-08 09:05:12 UTC
20261008-090510-546 2026-10-08 09:05:10 UTC
20261008-090508-328 2026-10-08 09:05:08 UTC
20261008-090506-073 2026-10-08 09:05:06 UTC
$ kamakiri deploys
デプロイID 状態 作成日時
20261008-090512-739 公開中 2026-10-08 09:05:12 UTC
20261008-090510-546 2026-10-08 09:05:10 UTC
20261008-090508-328 2026-10-08 09:05:08 UTC
20261008-090506-073 2026-10-08 09:05:06 UTC
kamakiri rollback publishes one of them again and waits the way a deploy does.
$ kamakiri rollback 20261008-090506-073
Rolled back to 20261008-090506-073
✓ live: https://my-site.kamakiri-pages.jp
$ kamakiri rollback 20261008-090506-073
20261008-090506-073 にロールバックしました
✓ 公開中: https://my-site.kamakiri-pages.jp
The files at the root of a deploy
_redirectsholds path redirects. See Redirects._headersholds response headers. See Headers.404.htmlis served for a path that does not exist. See Custom 404 page.
_redirects and _headers are not served as files. All three belong to the deploy they ship in, so a rollback restores that deploy’s redirects, headers and 404 page along with its files.
Deploy from CI
A CI runner authenticates with the KAMAKIRI_API_KEY environment variable. Its value is the api_key field in ~/.config/kamakiri/credentials.json on the machine where you ran kamakiri login. The client never prints the key, so copy it from that file into a repository secret. Logging in again later mints a new key and leaves this one valid.
kamakiri deploy waits in CI exactly as it does on your machine, with no timeout. Pass --no-wait if the job should end once the upload is accepted.
This GitHub Actions job deploys on every push to main. The checkout brings the committed .kamakiri/config.json, which names the site.
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install the client
run: curl -fsSL https://get.kamakiri-labs.jp/install.sh | sh
- name: Build
run: npm ci && npm run build
- name: Deploy
env:
KAMAKIRI_API_KEY: ${{ secrets.KAMAKIRI_API_KEY }}
run: $HOME/.local/bin/kamakiri deploy ./dist
Give the key to the deploy step alone, so the build never runs with it in its environment.