ConceptsBuilds & runtimes
Publish directory
The publish directory is the folder of a static site that nginx serves.
You set a directory, for example dist. nginx serves that directory.
1 / 3
Set the publish directory
ferry update docs --build-cmd "cd docs && npm ci --include=dev && npm run build" --publish-dir docs/outWhat nginx serves
Publish directory (--publish-dir) | With a build step | With no build step |
|---|---|---|
Set, for example dist | That directory. The build fails if it does not exist. | That directory |
. | The full root directory after the build | The root directory |
| Not set | The first of dist, build, out, public, _site and site that the build made. The build fails if there is none. | See below |
Not set, with no build step
Ferry uses the first of these that is true:
- The root directory has an
index.html: nginx serves the root directory. - One of the six directories has an
index.html: nginx serves the first one. - If not, nginx serves the root directory.