{
  "version": 2,
  "$schema": "http://json-schema.org/schema",
  "title": "Deploy",
  "description": "Deploy a page to a specified repository's gh-pages branch.",
  "type": "object",
  "properties": {
    "remote": {
      "type": "string",
      "description": "URL for the git remote to deploy to. If not specified, the remote will be determined based off of **this** repository's origin remote."
    },
    "directory": {
      "type": "string",
      "description": "Directory to push to gh-pages. If not specified, the output directory will be determined based off of this project's build target's output path."
    },
    "remoteName": {
      "type": "string",
      "description": "Name of the remote to push to",
      "default": "origin"
    },
    "commitMessage": {
      "type": "string",
      "description": "Message of the git commit to gh-pages branch",
      "default": "chore: :rocket: deploy new version to Github Pages"
    },
    "baseBranch": {
      "type": "string",
      "description": "Base branch to sync the gh-pages branch with",
      "default": "gh-pages"
    },
    "syncWithBaseBranch": {
      "type": "boolean",
      "description": "Indicate if the gh-pages branch should be synced with the base branch",
      "default": false
    },
    "syncStrategy": {
      "type": "string",
      "description": "Git command to use to sync the gh-pages branch with the base branch",
      "enum": ["rebase", "merge"],
      "default": "merge"
    },
    "syncGitOptions": {
      "type": "array",
      "description": "Additional git options to use when syncing the gh-pages branch with the base branch. The default prefers the freshly built files when a merge conflict occurs (`-X ours`), so a redeploy never gets blocked by stale content already on `gh-pages`.",
      "items": {
        "type": "string"
      },
      "default": ["--allow-unrelated-histories", "-X", "ours"]
    },
    "CNAME": {
      "type": "string",
      "description": "Custom domain to use for the gh-pages branch. Applied by creating a CNAME file in the root of the gh-pages branch"
    },
    "preview": {
      "type": "object",
      "description": "Preview deploy configuration. When set and the executor detects a pull request context (via `GITHUB_REF=refs/pull/<N>/merge` or `PR_NUMBER`), the build output is pushed into a subdirectory of the target branch instead of replacing it. Outside of a PR context, the executor falls back to a standard deploy.",
      "properties": {
        "url": {
          "type": "string",
          "description": "Base URL where the preview will be available. Supports `{prNumber}`, `{shortSha}`, and `{sha}` placeholders. If the value contains any placeholder it's treated as the full preview URL; otherwise `pathPrefix` is appended to it. If omitted entirely, the URL is derived from the `CNAME` option or the default GitHub Pages domain for the target remote."
        },
        "pathPrefix": {
          "type": "string",
          "description": "Subdirectory within the target branch to deploy into. Supports `{prNumber}`, `{shortSha}`, and `{sha}` placeholders. Defaults to `pr/<PR number>` (or `pr/<commit SHA>` if no PR number is available)."
        },
        "comment": {
          "type": "boolean",
          "description": "Whether to upsert a comment on the pull request with the preview URL. Requires a PR context and a `GH_TOKEN`/`GITHUB_TOKEN` with `pull-requests: write`.",
          "default": true
        }
      },
      "additionalProperties": false
    },
    "user": {
      "type": "object",
      "description": "User information to use when authoring deployment commit",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the user"
        },
        "email": {
          "type": "string",
          "description": "Email of the user"
        }
      }
    }
  },
  "required": []
}
