Working on a site as a team
A site is shared by the whole workspace: anyone with Hosting can put a new version up and look at it privately, and going live or going back is one click. This guide covers who does what, the habits that keep a team out of trouble, and an automated deploy for developers.
Who can do what?
There are two kinds of people on a Hosting site: members and admins. Both need a Hosting seat in the workspace; the admin part comes from the workspace's own permissions (managing API keys needs the security permission, attaching domains the administrator one), not from a second license.
- Members create sites, upload and discard deploys, open previews, publish a deploy, publish an earlier version, and read the site's history and the list of API keys (never the key itself).
- Admins do everything a member does and also create and revoke API keys and attach custom domains. Those two decide who can change the site without signing in, and where it is served, so they are kept to administrators.
Roles are per workspace. Every member with Hosting sees every site in the workspace; there are no per-site roles or preview comments yet.
How does a change reach the live site?
Every change is a new deploy. It never overwrites the live one, which is why going back is safe.
- Upload. Send the folder. The deploy starts as
uploadingand becomesreadyonce every file is checked. Nobody sees it yet. - Preview. Each deploy has its own private link, signed and valid for 7 days. Share it with a teammate or a client; it works without signing in, so treat it like a secret link.
- Publish. Make the previewed deploy the live one. Visitors get it immediately and the previous version stays in the list.
- Roll back. Pick any earlier ready deploy and make it live again. Nothing is deleted, and you can roll forward again the same way.
Which way should we deploy: dashboard, CI or Arch?
All three do the same thing underneath, so they mix freely and show up in the same history. The site history records every deploy and publish with its date.
- The dashboard. Open the site in Hosting, drop the folder, open the preview, press Publish. Best for non-developers and one-off changes. Rollback is the button on the production card.
- CI (an API key). A script or GitHub workflow runs the same steps whenever code is merged. Best for developers who already build the site from a repository. See the section for developers below.
- Arch. The website builder publishes to Hosting for you. Each publish is a deploy, so previews and publishing here work on Arch sites too.
A good split for a mixed team: designers edit in Arch or upload from the dashboard, developers deploy through CI, and everyone uses the same preview-then-publish habit.
What should a team agree on?
- Who is allowed to publish, and whether a second person must preview first.
- Who owns the API keys. Give every automation its own key with a clear name, such as
github-actions, so you can revoke one without stopping the others. - Where the key lives: only in your CI secret store, never in the repository and never in a chat.
- How far back you can go. The plan keeps a limited number of recent deploys; the limits and plans page shows how many.
For developers: deploy from CI
A site API key (it starts with shk_) works only for the site it was created on. Create it on the site page under API keys, as an admin. It is shown once. Store it as the repository secret SOARTANA_API_KEY.
Every call sends Authorization: Bearer <key> to https://api.soartana.com/api/public/hosting/v1. Any credential problem is a 401 UNAUTHENTICATED; the limit is 120 requests a minute per key. The workflow below uploads a built dist/ folder on every push to main, checks the preview, then promotes behind a production environment. Add required reviewers to that environment in GitHub if you want a human to approve each go-live; a rollback uses the same environment. Run it by hand with a deploy id to roll back. The key is given only to the steps that call Soartana, never to your build.
name: Soartana deploy
on:
push:
branches: [main]
workflow_dispatch:
inputs:
rollback_to:
description: Deploy id to bring back (leave empty to deploy normally)
required: false
env:
API: https://api.soartana.com/api/public/hosting/v1 # the key is NOT here: only the steps that call Soartana receive it
# Two quick pushes must not finish out of order: one deploy at a time, in order.
concurrency:
group: soartana-deploy
cancel-in-progress: false
jobs:
preview:
if: ${{ inputs.rollback_to == '' }}
runs-on: ubuntu-latest
outputs:
deploy_id: ${{ steps.upload.outputs.deploy_id }}
steps:
- uses: actions/checkout@v4
- run: npm ci && npm run build # your build; the folder to publish is dist/
- id: upload
name: Upload
env:
SOARTANA_API_KEY: ${{ secrets.SOARTANA_API_KEY }}
run: |
set -euo pipefail
# 1. Describe the folder: one entry per file, path and size in bytes.
# Hidden files are left out, except .well-known (the rule of the other deploy scripts).
(cd dist && find . -type f \( -path './.well-known/*' -o -not -path '*/.*' \) -not -path '*/node_modules/*' | sed 's|^\./||') > files.txt
while IFS= read -r f; do
jq -n --arg path "$f" --argjson size "$(wc -c < "dist/$f" | tr -d ' ')" '{path:$path,size:$size}'
done < files.txt | jq -s '{files: .}' > manifest.json
# 2. Start the deploy: the answer holds one presigned PUT per file.
curl -sS --fail-with-body -X POST "$API/deploys" -H "Authorization: Bearer $SOARTANA_API_KEY" \
-H "Content-Type: application/json" -d @manifest.json > deploy.json || { cat deploy.json >&2; exit 1; }
# 3. Upload every file with exactly the headers the API returned.
jq -c '.data.uploads[]' deploy.json | while IFS= read -r u; do
jq -r '.headers | to_entries[] | "header = \"\(.key): \(.value)\""' <<<"$u" > put.cfg
curl -sS --fail-with-body -X PUT "$(jq -r .url <<<"$u")" -K put.cfg \
--data-binary @"dist/$(jq -r .path <<<"$u")"
done
# 4. Finalize: every file is checked for presence and exact size.
DEPLOY_ID=$(jq -r .data.deploy.id deploy.json)
curl -sS --fail-with-body -X POST "$API/deploys/$DEPLOY_ID/finalize" -H "Authorization: Bearer $SOARTANA_API_KEY"
echo "deploy_id=$DEPLOY_ID" >> "$GITHUB_OUTPUT"
- name: Preview
env:
SOARTANA_API_KEY: ${{ secrets.SOARTANA_API_KEY }}
DEPLOY_ID: ${{ steps.upload.outputs.deploy_id }}
run: |
set -euo pipefail
# The deploy carries its own signed preview link (valid for 7 days).
RES=$(curl -sS --fail-with-body "$API/deploys/$DEPLOY_ID" -H "Authorization: Bearer $SOARTANA_API_KEY") || { echo "$RES" >&2; exit 1; }
PREVIEW_URL=$(jq -r .data.preview_url <<<"$RES")
curl -sS --fail-with-body -I "$PREVIEW_URL" > /dev/null
echo "Preview: $PREVIEW_URL" >> "${GITHUB_STEP_SUMMARY:-/dev/null}"
echo "Preview: $PREVIEW_URL"
promote:
needs: preview
runs-on: ubuntu-latest
environment: production # add required reviewers here for a human sign-off
steps:
- name: Promote
env:
SOARTANA_API_KEY: ${{ secrets.SOARTANA_API_KEY }}
DEPLOY_ID: ${{ needs.preview.outputs.deploy_id }}
run: |
set -euo pipefail
# Keep the API's own error message: a bare pipe into jq would swallow it.
RES=$(curl -sS --fail-with-body -X POST "$API/deploys/$DEPLOY_ID/promote" -H "Authorization: Bearer $SOARTANA_API_KEY") || { echo "$RES" >&2; exit 1; }
jq -r '"Live at " + .data.default_url' <<<"$RES"
rollback:
if: ${{ inputs.rollback_to != '' }}
runs-on: ubuntu-latest
environment: production # the same reviewers gate a rollback
steps:
- name: Roll back
env:
SOARTANA_API_KEY: ${{ secrets.SOARTANA_API_KEY }}
ROLLBACK_TO: ${{ inputs.rollback_to }}
run: |
set -euo pipefail
RES=$(curl -sS --fail-with-body -X POST "$API/rollback" -H "Authorization: Bearer $SOARTANA_API_KEY" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg id "$ROLLBACK_TO" '{deploy_id: $id}')") || { echo "$RES" >&2; exit 1; }
jq -r '"Production is back on " + .data.production_deploy_id' <<<"$RES"
Needs only bash, curl 7.76 or newer, and jq, which GitHub's Ubuntu runners include. The same calls by hand, for one file; the workflow does the same for a whole folder. Set these first:
export SOARTANA_API_KEY="shk_..." # never commit it
export API="https://api.soartana.com/api/public/hosting/v1"SIZE=$(wc -c < index.html | tr -d ' ')
curl -sS -X POST "$API/deploys" \
-H "Authorization: Bearer $SOARTANA_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"files\":[{\"path\":\"index.html\",\"size\":$SIZE,\"content_type\":\"text/html\"}]}" \
> deploy.json
DEPLOY_ID=$(jq -r '.data.deploy.id' deploy.json)jq -r '.data.uploads[0].headers | to_entries[] | "header = \"\(.key): \(.value)\""' deploy.json > put.cfg
curl -sS -X PUT "$(jq -r '.data.uploads[0].url' deploy.json)" -K put.cfg --data-binary @index.htmlcurl -sS -X POST "$API/deploys/$DEPLOY_ID/finalize" \
-H "Authorization: Bearer $SOARTANA_API_KEY"curl -sS -X POST "$API/deploys/$DEPLOY_ID/promote" \
-H "Authorization: Bearer $SOARTANA_API_KEY"set -euo pipefail
# The deploy carries its own signed preview link (valid for 7 days).
RES=$(curl -sS --fail-with-body "$API/deploys/$DEPLOY_ID" -H "Authorization: Bearer $SOARTANA_API_KEY") || { echo "$RES" >&2; exit 1; }
PREVIEW_URL=$(jq -r .data.preview_url <<<"$RES")
curl -sS --fail-with-body -I "$PREVIEW_URL" > /dev/null
echo "Preview: $PREVIEW_URL" >> "${GITHUB_STEP_SUMMARY:-/dev/null}"
echo "Preview: $PREVIEW_URL"set -euo pipefail
RES=$(curl -sS --fail-with-body -X POST "$API/rollback" -H "Authorization: Bearer $SOARTANA_API_KEY" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg id "$ROLLBACK_TO" '{deploy_id: $id}')") || { echo "$RES" >&2; exit 1; }
jq -r '"Production is back on " + .data.production_deploy_id' <<<"$RES"To find the id to roll back to, list the newest 50 deploys; each carries its status, whether it is live, and its date:
curl -sS --fail-with-body "$API/deploys" -H "Authorization: Bearer $SOARTANA_API_KEY" | jq -r '.data[] | "\(.id) \(.status) \(.created_at) live=\(.is_production)"'- Upload links last 15 minutes and are create-only. A retried upload that answers
412is already stored. - A run that stops half way (a failed upload, a cancelled job) leaves a deploy in
uploading. A site holds only 3 of them; a fourth start answersHOSTING_TOO_MANY_PENDINGuntil the old ones expire, or you discard them from the site page in the dashboard. - A finalize that finds a missing or short file marks the deploy
failedand answersHOSTING_DEPLOY_INCOMPLETE. Start a new deploy. - Promote and rollback answer
HOSTING_DEPLOY_NOT_READYfor a deploy that is not ready. Every code is on the Errors page and every field in the API reference.
How does this work for an agency and its clients?
An agency builds and runs sites for clients who keep a workspace of their own. The same lifecycle applies; what changes is who sits where.
- The agency sees its clients under the Clients tab in Hosting, and manages their sites with the same upload, preview and publish steps. The agency guide shows how to link a client and who pays.
- The client signs in to their own workspace or to the branded Client Portal. They see their sites and previews, and the agency's changes appear in the same history. Ending the link never takes the site away from them.
- Managed is the plan for a site the agency runs for the client. It holds more sites than the self-serve plans. It does not include review by Soartana staff: the client approves any change an assistant proposes, and hands-on review of the work is a service the agency offers. Compare plans on limits and plans.
Did this answer it?
If something here did not match what you see, ask Soara from the avatar in the app rail while you are on the screen in question, or open the app and look at that screen again. The help home lists every module guide.