{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/deployer-recipe/latest.json",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/deployphp/deployer/master/src/schema.json",
    "sourceSha256": "3f74c1e7ade87212d326ef97334b1551b4a27786a3c80e2e22b55102f371c919"
  },
  "type": "object",
  "properties": {
    "import": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "config": {
      "type": "object",
      "additionalProperties": true
    },
    "hosts": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "tasks": {
      "type": "object",
      "additionalProperties": {
        "oneOf": [
          {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "cd": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "cd"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "run": {
                      "type": "string"
                    },
                    "cd": {
                      "type": "string"
                    },
                    "cwd": {
                      "type": "string"
                    },
                    "env": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "secrets": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "nothrow": {
                      "type": "boolean"
                    },
                    "forceOutput": {
                      "type": "boolean"
                    },
                    "timeout": {
                      "type": "number"
                    },
                    "idleTimeout": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "run"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "run_locally": {
                      "type": "string"
                    },
                    "cwd": {
                      "type": "string"
                    },
                    "timeout": {
                      "type": "number"
                    },
                    "idleTimeout": {
                      "type": "number"
                    },
                    "secrets": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "env": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "nothrow": {
                      "type": "boolean"
                    },
                    "forceOutput": {
                      "type": "boolean"
                    },
                    "shell": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "run_locally"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "upload": {
                      "type": "object",
                      "properties": {
                        "src": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        },
                        "dest": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "src",
                        "dest"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "upload"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "download": {
                      "type": "object",
                      "properties": {
                        "src": {
                          "type": "string"
                        },
                        "dest": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "src",
                        "dest"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "download"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "desc": {
                      "type": "string"
                    },
                    "once": {
                      "type": "boolean"
                    },
                    "hidden": {
                      "type": "boolean"
                    },
                    "limit": {
                      "type": "number"
                    },
                    "select": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            }
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        ]
      }
    },
    "before": {
      "type": "object",
      "additionalProperties": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        ]
      }
    },
    "after": {
      "type": "object",
      "additionalProperties": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        ]
      }
    },
    "fail": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    }
  },
  "additionalProperties": false
}
