VitePress is a Vue-powered static site generator built for documentation. This guide shows how to deploy your VitePress site on Runway.
Create an application on Runway:
runway app create
VitePress outputs its build (npm run docs:build) to e.g. docs/.vitepress/dist. To serve it, Runway uses a combination of buildpacks: Node.js, npm, and nginx.
.vitepress/dist.Configure via the Runway CLI or a project.toml in your repository root.
runway app config set \
BP_NODE_RUN_SCRIPTS=docs:build \
BP_KEEP_FILES=docs/.vitepress/dist \
BP_WEB_SERVER_ROOT=docs/.vitepress/dist \
BP_WEB_SERVER=nginx
[build]
[[build.env]]
name = "BP_NODE_RUN_SCRIPTS"
value = "docs:build"
[[build.env]]
name = "BP_KEEP_FILES"
value = "docs/.vitepress/dist"
[[build.env]]
name = "BP_WEB_SERVER_ROOT"
value = "docs/.vitepress/dist"
[[build.env]]
name = "BP_WEB_SERVER"
value = "nginx"
In case you used a project.toml, please commit it to your repository:
git add project.toml && git commit -m 'Build configuration`
Then you are ready to deploy:
runway app deploy