Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 39 additions & 17 deletions docs/concepts/deploy.yml.md
Original file line number Diff line number Diff line change
@@ -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.
<details>
<summary>Fundamental structure</summary>

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
```

</details>

## 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.

<details>
<summary>GitHub parameter field</summary>

```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
</details>

## 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.

<details>
<summary>Enable Approval</summary>

```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.*
</details>
5 changes: 5 additions & 0 deletions docs/references/deploy.yml.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# deploy.yml


Field |Type |Required |Description
--- |---- |--- |---
`envs` |*[][Env](#env)* |`true` |Thie field configures the pipeline for each environment, respectively.

## Env


Expand Down
2 changes: 1 addition & 1 deletion ui/src/views/RepoDeploy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export default function RepoDeploy(): JSX.Element {
status="warning"
title="There is no configuration file."
extra={
<Button type="primary" key="console">
<Button type="primary" key="console" href="https://docs.gitploy.io/concepts/deploy.yml">
Read Document
</Button>
}
Expand Down
2 changes: 1 addition & 1 deletion ui/src/views/RepoLock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function RepoLock(): JSX.Element {
status="warning"
title="There is no configuration file."
extra={
<Button type="primary" key="console">
<Button type="primary" key="console" href="https://docs.gitploy.io/concepts/deploy.yml">
Read Document
</Button>
}
Expand Down
2 changes: 1 addition & 1 deletion ui/src/views/RepoRollback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default function RepoHome(): JSX.Element {
status="warning"
title="There is no configuration file."
extra={
<Button type="primary" key="console">
<Button type="primary" key="console" href="https://docs.gitploy.io/concepts/deploy.yml">
Read Document
</Button>
}
Expand Down