diff --git a/docs/concepts/deploy.yml.md b/docs/concepts/deploy.yml.md index 8bb0dafd..67ad5b4d 100644 --- a/docs/concepts/deploy.yml.md +++ b/docs/concepts/deploy.yml.md @@ -1,40 +1,62 @@ # deploy.yml - Gitploy configures a pipeline with a simple, easy‑to‑read file that you commit to your git repository. +Gitploy configures a pipeline with a simple, easy‑to‑read file that you commit to your git repository. *The configuration file must be at the head of the default branch.* The default path is `deploy.yml` at the root directory, but you can replace the file path in the settings tab of Gitploy. You can check the [document](../references/deploy.yml.md) for the specification of the configuration file. -## Features +## Environments -### Parameters for Github deployment +The configuration file is configured for each environment, respectively. The following example is the fundamental structure of a configuration file. -Github deployments offer a few configurable [parameters](https://docs.github.com/en/rest/reference/repos#create-a-deployment--parameters). You can configure these parameters in the deploy.yml file. You can check details in the reference. +
+Fundamental structure -Here is the example to deploy based on tag: +```yaml +envs: + - name: dev + auto_merge: false + required_contexts: [] + - name: production + auto_merge: true + required_contexts: + - test + - docker-image +``` + +
+ +## Parameters for Github deployment API + +When Gitploy deploys, it posts a new deployment to GitHub [deployments API](https://docs.github.com/en/rest/reference/repos#create-a-deployment) with parameters from the configuration file. The configuration file provides fields to configure all parameters of GitHub deployment API. You can check the [document](../references/deploy.yml.md) for the detail. + +
+GitHub parameter field ```yaml envs: - - name: prod + - name: production + task: deploy:lambda + description: Start to deploy to the production. auto_merge: false required_contexts: - - "go-test" - - "react-test" - - "publish-image" + - test + - integration-test production_environment: true ``` -### Approval +
+ +## Approval -Gitploy supports the approval step to protect to deploy until it matches the required approving approvals. +Gitploy provides the approval step to protect to deploy until it matches the required approving approvals. + +
+Enable Approval ```yaml envs: - - name: prod + - name: production approval: enabled: true required_count: 1 ``` -## File Location - -When you activate the repository in Gitploy, the default path is `deploy.yml` at the root. But you can replace the file path in the settings tab in Gitploy. - -*Note that Gitploy always reads the file from the head of the default branch.* +
diff --git a/docs/references/deploy.yml.md b/docs/references/deploy.yml.md index e1797043..a8c71e1d 100644 --- a/docs/references/deploy.yml.md +++ b/docs/references/deploy.yml.md @@ -1,5 +1,10 @@ # deploy.yml + +Field |Type |Required |Description +--- |---- |--- |--- +`envs` |*[][Env](#env)* |`true` |Thie field configures the pipeline for each environment, respectively. + ## Env diff --git a/ui/src/views/RepoDeploy.tsx b/ui/src/views/RepoDeploy.tsx index 5a9c3a84..fccaee75 100644 --- a/ui/src/views/RepoDeploy.tsx +++ b/ui/src/views/RepoDeploy.tsx @@ -127,7 +127,7 @@ export default function RepoDeploy(): JSX.Element { status="warning" title="There is no configuration file." extra={ - } diff --git a/ui/src/views/RepoLock.tsx b/ui/src/views/RepoLock.tsx index 7e1c7465..64cef04e 100644 --- a/ui/src/views/RepoLock.tsx +++ b/ui/src/views/RepoLock.tsx @@ -39,7 +39,7 @@ export default function RepoLock(): JSX.Element { status="warning" title="There is no configuration file." extra={ - } diff --git a/ui/src/views/RepoRollback.tsx b/ui/src/views/RepoRollback.tsx index 03d4904e..ce2ead79 100644 --- a/ui/src/views/RepoRollback.tsx +++ b/ui/src/views/RepoRollback.tsx @@ -77,7 +77,7 @@ export default function RepoHome(): JSX.Element { status="warning" title="There is no configuration file." extra={ - }