Skip to content

Deploy a static website

A static website is plain HTML/CSS/JS, or the build output of a framework like Astro, SvelteKit, Vue, or React. CloudQube serves it from an EU-only CDN with a free SSL certificate.

  1. Add a static website to a project from the catalog or a template.

  2. Deploy your built files (the contents of your dist/build folder). Each deploy is kept in your history, so you can roll back to a previous one.

  3. Your site goes live with HTTPS, on your project’s domain or, if the project doesn’t have one yet, on a generated web address.

A single-page app (React, Svelte, Vue and friends) ships one index.html and draws every screen in the browser, so there is no file at a path like /dashboard. By default that path returns “not found”.

Open the site in the dashboard and turn on Single-page app routing. Paths with no file of their own then serve index.html, and your app draws the right screen from the address bar. Agents can set the same thing with spa_routing on site.deploy.

Leave it off when every page on your site is a real file. With it on, a typo or a dead link shows your homepage and reports success, which search engines read as a broken page.

Once the static website exists, you can deploy it on every push. Your own CI builds the site and uploads the result, and CloudQube stays out of your repository entirely. Any CI works, GitHub Actions and GitLab CI as well as EU-hosted runners like Forgejo/Codeberg or Woodpecker.

  1. Create the static website using the steps above, if you haven’t already. A deploy token belongs to one specific site.

  2. Open the site in the dashboard, find the CLI / CI deploy section, and choose Generate deploy token. The token is shown once, so copy it now.

  3. Store the token in your CI as a secret named CQ_DEPLOY_TOKEN, and keep it out of your repository.

  4. Add a deploy job for your CI from the tabs below. Each one builds the site, zips the output folder (dist by default), and uploads it. Adjust the build command and output folder to match your project.

    Terminal window
    # Set CQ_DEPLOY_TOKEN in your environment / CI secrets first.
    npm ci && npm run build
    cd dist && zip -r ../site.zip . && cd ..
    curl -X POST https://cloudqube.eu/api/v1/projects/PROJECT_ID/cloudqube/SITE_ID/deploy-cli \
    -H "Authorization: Bearer $CQ_DEPLOY_TOKEN" \
    -F file=@site.zip
  5. Push your changes, and your CI builds and uploads the site. Each upload appears in the site’s Deploy history, so you can roll back to a previous one at any time.