Zum Inhalt springen
GigadriveDocs

Deploy

How gigadrive deploy resolves configuration and applications, what it uploads, and every flag it accepts.

gigadrive deploy packages the current directory, uploads it to Gigadrive Network, and streams the build until the deployment is live. It takes no positional argument, so whichever directory you run it in is the one that ships.

Deploying the current directory

  1. Sign in once

    gigadrive login

    In CI, set GIGADRIVE_BEARER_TOKEN or the client credentials pair instead. See Authentication.

  2. Run the deploy from the project root

    gigadrive deploy
  3. Watch the pipeline

    Status changes and build logs stream into your terminal until the deployment is active or fails.

    Creating deployment...
    Deployment ID: 0195c1f4-0000-7000-8000-0000000000aa
    Creating archive...
    Archive created (4.2 MB)
    Uploading archive...
    Upload complete.
    The deployment pipeline is now being provisioned. This may take a few seconds.
    Status: Pending
    Status: Queued
    Status: Building
    Status: Provisioning
    Status: Active
    Deployed to https://marketing-site.gigadrive.app

Status and logs are polled once a second. Log lines marked as errors or warnings go to stderr, so gigadrive deploy > build.log keeps them on your screen.

When the deployment reaches FAILED, the command prints The deployment failed. Please check the logs for more information. and exits non-zero. When it reaches ACTIVE but the hostname lookup returns nothing, it prints Deployment is live. instead of a URL.

What the CLI needs to find

Before anything is uploaded, the CLI resolves a build configuration. It looks in the current directory for a config file, in this order:

  1. gigadrive.ts, gigadrive.mts, gigadrive.cts
  2. gigadrive.js, gigadrive.mjs, gigadrive.cjs
  3. gigadrive.yaml, gigadrive.yml, gigadrive.json
  4. nebula.yaml, nebula.yml, nebula.json

The first name that exists wins, and the six module formats are executed rather than parsed. See TypeScript configuration.

Independently, it tries to detect your framework from the project itself. When both are present they are merged, with the framework supplying defaults and your file overriding them. A project on a detected framework and no config file deploys on framework defaults alone, so there is nothing to write for a stock Next.js or Astro app.

With neither, the deploy stops before it uploads anything:

No config file found and no framework detected.

Run gigadrive debug config to print the resolved configuration, and the path it came from, without deploying.

Which application receives the deployment

The CLI resolves this in three steps and stops at the first one that answers.

--app wins. Passing an application ID skips the project link entirely, reads nothing from disk and creates nothing.

Without it, the CLI reads .gigadrive/project.json. See Project linking for what that file holds.

With neither, it creates an application and links the directory to it. It lists the organizations you belong to, narrowed to --org when you pass one. A single organization is selected without asking; several open a picker titled Select an organization for this application. The new application is named after --name, or after the current directory when you omit it, and the CLI prints Created and linked application marketing-site (0195c11c-0000-7000-8000-000000000042). before carrying on with the deploy.

Two errors come out of that last step. No organization is available for this deployment. Create an organization, then run "gigadrive deploy" again. means the account owns nothing to deploy into. An --org that does not match reports Organization "<id>" was not found among your organizations.

What gets uploaded

The CLI builds a zip of the working directory and honours ignore files both at the project root and in every subdirectory it walks: .gitignore, .dockerignore, .nowignore, .vercelignore and .gigadriveignore. On top of those it always excludes .git/, node_modules/, .DS_Store and Thumbs.db, plus anything listed under excludeFiles in the resolved configuration.

The archive is written to your system temp directory as project-<timestamp>.zip and uploaded in 10 MB parts, three parts at a time.

Flags

FlagAliasDescription
--app-aApplication ID to deploy to (overrides the linked application)
--org-oOrganization ID to use when automatically creating an application
--name-nApplication name to use when automatically creating an application

--org and --name only matter on the path where the CLI creates an application. Once the directory is linked, both are ignored.

gigadrive deploy --app 0195c11c-0000-7000-8000-000000000042
gigadrive deploy --org 0195c0aa-0000-7000-8000-0000000000ff --name "Marketing site"

The legacy platform deploy alias

gigadrive platform deploy is the same command object registered under a second name. It takes the same three flags and behaves identically. It stays for older scripts; write gigadrive deploy in new ones.