Static sites
The assets-only fallback, covering when Gigadrive Network publishes your project root as edge assets and the configuration it writes to do it.
A project with no configuration file and no detected framework still deploys, as long as it looks like a static site. Gigadrive Network writes a minimal configuration for it and publishes the project root to the edge as static assets, which is what happens to a folder of HTML dropped into the console.
When the fallback applies
Two things have to be true. There is no configuration file at the project root under any accepted name, from gigadrive.ts to nebula.json as listed in Configuration, and no framework was detected.
The build then decides whether the project looks static, in this order:
- A
composer.jsonat the project root. Not static, because publishing the root of a PHP project would serve its source and configuration as downloadable files. - Otherwise,
index.htmlat the project root. Static. - Otherwise, a
package.jsonat the project root. Not static, and the deployment fails withNo config file found and no framework detected. - Otherwise, the root listing is scanned for one entry that looks static, skipping dotfiles and configuration files. Any directory counts, and so does a file ending in
.html,.htm,.css,.js,.mjs,.cjs,.json,.svg,.png,.jpg,.jpeg,.gif,.webp,.ico,.txt,.xml,.map,.woff,.woff2,.ttfor.eot. ALICENSEor aMakefileis skipped rather than counted against the project, so one match anywhere in the listing is enough.
The configuration it writes
The fallback writes a gigadrive.yaml at the project root with two keys in it, and nothing else:
version: 4
assets: '.'The build log records No framework or config detected; deploying project root as static assets. Nothing else is inferred: no Function, no route table of your own, no environment variables.
What gets published
Every regular file under the project root, walked recursively to a depth of 100 directories. Files ending in .htaccess or .htpasswd are always dropped, and so are environment files: .env and any .env.* such as .env.local, at any depth.
Each published file answers GET, HEAD and OPTIONS at its own path. An index.html also answers the directory that contains it, with or without a trailing slash: a published about/index.html answers /about and /about/, and one at the root answers /. A directory with no published index file returns 404 rather than falling back to a page from elsewhere in the site. Static assets covers this in full.
When the root has no index.html or index.htm, the fallback still answers / in two cases. If exactly one HTML page sits at the root, that page also answers /. If the project is a single file that is not HTML, / redirects to that file. With several HTML pages and no index, / returns 404.
There is no single-page-app rewrite. A request for a path with no matching file returns 404, so a client-side router needs its own configuration file with a route pointing at your shell document.
Taking control
Write a gigadrive.yaml yourself once you have a build step, and point assets at its output directory instead of the project root:
version: 4
assets: distStatic assets covers how they are served and cached after that.
