Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit 906774c

Browse files
author
Noah Hanjun Lee
authored
Fix the link of the 'Read Doc' button (#148)
* Add the link to the 'Read Document' button * Fix docs for deploy.yml
1 parent 9341174 commit 906774c

File tree

5 files changed

+47
-20
lines changed

5 files changed

+47
-20
lines changed

docs/concepts/deploy.yml.md

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,62 @@
11
# deploy.yml
22

3-
Gitploy configures a pipeline with a simple, easy‑to‑read file that you commit to your git repository.
3+
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.
44

5-
## Features
5+
## Environments
66

7-
### Parameters for Github deployment
7+
The configuration file is configured for each environment, respectively. The following example is the fundamental structure of a configuration file.
88

9-
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.
9+
<details>
10+
<summary>Fundamental structure</summary>
1011

11-
Here is the example to deploy based on tag:
12+
```yaml
13+
envs:
14+
- name: dev
15+
auto_merge: false
16+
required_contexts: []
17+
- name: production
18+
auto_merge: true
19+
required_contexts:
20+
- test
21+
- docker-image
22+
```
23+
24+
</details>
25+
26+
## Parameters for Github deployment API
27+
28+
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.
29+
30+
<details>
31+
<summary>GitHub parameter field</summary>
1232
1333
```yaml
1434
envs:
15-
- name: prod
35+
- name: production
36+
task: deploy:lambda
37+
description: Start to deploy to the production.
1638
auto_merge: false
1739
required_contexts:
18-
- "go-test"
19-
- "react-test"
20-
- "publish-image"
40+
- test
41+
- integration-test
2142
production_environment: true
2243
```
2344
24-
### Approval
45+
</details>
46+
47+
## Approval
2548
26-
Gitploy supports the approval step to protect to deploy until it matches the required approving approvals.
49+
Gitploy provides the approval step to protect to deploy until it matches the required approving approvals.
50+
51+
<details>
52+
<summary>Enable Approval</summary>
2753
2854
```yaml
2955
envs:
30-
- name: prod
56+
- name: production
3157
approval:
3258
enabled: true
3359
required_count: 1
3460
```
3561
36-
## File Location
37-
38-
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.
39-
40-
*Note that Gitploy always reads the file from the head of the default branch.*
62+
</details>

docs/references/deploy.yml.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# deploy.yml
22

3+
4+
Field |Type |Required |Description
5+
--- |---- |--- |---
6+
`envs` |*[][Env](#env)* |`true` |Thie field configures the pipeline for each environment, respectively.
7+
38
## Env
49

510

ui/src/views/RepoDeploy.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export default function RepoDeploy(): JSX.Element {
127127
status="warning"
128128
title="There is no configuration file."
129129
extra={
130-
<Button type="primary" key="console">
130+
<Button type="primary" key="console" href="https://docs.gitploy.io/concepts/deploy.yml">
131131
Read Document
132132
</Button>
133133
}

ui/src/views/RepoLock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default function RepoLock(): JSX.Element {
3939
status="warning"
4040
title="There is no configuration file."
4141
extra={
42-
<Button type="primary" key="console">
42+
<Button type="primary" key="console" href="https://docs.gitploy.io/concepts/deploy.yml">
4343
Read Document
4444
</Button>
4545
}

ui/src/views/RepoRollback.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default function RepoHome(): JSX.Element {
7777
status="warning"
7878
title="There is no configuration file."
7979
extra={
80-
<Button type="primary" key="console">
80+
<Button type="primary" key="console" href="https://docs.gitploy.io/concepts/deploy.yml">
8181
Read Document
8282
</Button>
8383
}

0 commit comments

Comments
 (0)