deploy

package
v0.5.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package deploy writes host-specific adapter files (redirects, config) into a built site so it can be dropped onto a static host without manual setup.

Index

Constants

This section is empty.

Variables

View Source
var Targets = []string{"netlify", "vercel", "cloudflare", "gh-pages", "docker"}

Targets lists the supported deploy adapters.

Functions

func Emit

func Emit(target string, cfg *config.Config, root, outDir string, opts ...Options) ([]string, error)

Emit writes the adapter files for target and returns their paths. root is the project directory (vercel.json and the Docker files live there); outDir is the build output.

func ServerFeatures

func ServerFeatures(root, outDir string) []string

ServerFeatures lists the server-side features a built project uses. A static host serves none of them, so deploying such a project to a static target would publish pages whose dynamic parts silently do nothing.

Types

type Options

type Options struct {
	// StaticOnly acknowledges that the project uses server features that a
	// static target will not run, and deploys the static output anyway.
	StaticOnly bool
}

Options tunes Emit.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL