Skip to content

Commit 020984c

Browse files
author
Noah Lee
authored
Enhances the docs for 'how it works' (#16)
* Enhance 'how it works' page * Fix the typos for the index of docs
1 parent 91e89ff commit 020984c

File tree

3 files changed

+44
-13
lines changed

3 files changed

+44
-13
lines changed

docs/concepts/how-it-work.md

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,51 @@ sidebar_position: 1
44

55
# How it works
66

7-
Gitploy builds the system around GitHub [deployment API](https://docs.github.com/en/rest/reference/deployments#deployments). **It's an event-driven decoupled way to deploy your code.** Internally, Gitploy creates a new Github deployment resource, and Github dispatches a deployment event that external services can listen for and act. It enables developers and organizations to build loosely coupled tooling.
7+
Gitploy builds the system around GitHub [deployment API](https://docs.github.com/en/rest/reference/deployments#deployments). Deployment API is a request to deploy a specific ref (branch, SHA, tag), and GitHub dispatches an event to deployment toolings that can listen for and act on when a request is posted. **It's an event-driven decoupled way to deploy your code.** This article looks under the hood Gitploy interacts with deployment API.
88

9-
This approach has several pros:
109

11-
* Replace deployment tools easily without changing your deployment pipeline.
12-
* Easy to implement details of deploying different types of applications (e.g., web, native).
10+
## GitHub Deployment API
11+
12+
The deployment API consists of these stages:
13+
14+
1. A user selects a ref(branch, SHA, tag) to deploy.
15+
2. Gitploy verifies the ref for deployment safety.
16+
3. It requests GitHub to deploy a specific ref.
17+
18+
Of course, Gitploy follows these stages to deploy a ref and enhances each stage to use it easily and safely.
19+
20+
### Select a ref(branch, SHA, tag)
21+
22+
A ref can be any named branch, tag, or SHA, and it is determined by how to deploy an application. If an application uses semantic versioning, the ref should be a tag(e.g., `v0.5.5`).
23+
24+
Gitploy provides an intuitive UI similar to GitHub, enabling users to select a ref easily even though a user is a newcomer to the system. And it displays the details of a commit such as SHA, message, creator, and creation time. So it enables to let users know which commits are deployed.
25+
26+
### Verification
27+
28+
Before deploying a ref, it needs verification for deployment safety. The deployment API provides these verifications:
29+
30+
* `auto_merge`: Ensure that the requested ref is not behind the repository's default branch.
31+
* `required_contexts`: Ensure that commit statuses are in that success state.
32+
33+
Gitploy provides the file (i.e., `deploy.yml`) to configure the parameters for each runtime environment, respectively.
34+
35+
### Event Dispatch
36+
37+
Gitploy posts a request to GitHub, and it dispatches an event to deployment toolings.
38+
39+
## Deployment Tooling
40+
41+
### Update status
42+
43+
After deployment, a deployment tooling must update the deployment status if it has succeeded or not by the [deployment status API](https://docs.github.com/en/rest/reference/deployments#deployment-statuses). It enables Gitploy to sync the deployment status and display the deployment status with a redirection link for the deployment details, such as logs.
44+
45+
![Deployment statuses](../../static/img/docs/statuses.png)
1346

1447
Below is a simple diagram for how these interactions would work:
1548

1649
```
1750
+---------+ +--------+ +---------+ +-------------+
18-
| Gitploy | | GitHub | | Tools | | Your Server |
51+
| Gitploy | | GitHub | | Tooling | | Your Server |
1952
+---------+ +--------+ +---------+ +-------------+
2053
| | | |
2154
| Create Deployment | | |
@@ -31,18 +64,16 @@ Below is a simple diagram for how these interactions would work:
3164
| | | |
3265
| | Deployment Status | |
3366
| |<----------------------| |
34-
| Deployment Status | | |
35-
|<---------------------| | |
67+
| | | |
68+
| | | |
3669
| | | |
3770
| | | Deploy Completed |
3871
| | |<--------------------|
3972
| | Deployment Status | |
4073
| |<----------------------| |
41-
| Deployment Status | | |
42-
|<---------------------| | |
74+
| | | |
75+
| | | |
4376
| | | |
4477
```
4578

46-
Gitploy lets you can build the advanced deployment system so your team and organization enable to deploy the application with lower risk and faster.
47-
4879
*Keep in mind that Gitploy is never actually accessing your servers. It's up to your tools to interact with deployment events.*

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ sidebar_position: 1
33
title: What is Gitploy?
44
---
55

6-
Gitploy is a tooling that helps your organization build the deployment system in minutes. It enables your organization **to deploy in the same manner** without worrying about the details of different types of applications and **to deploy differently** for each application, respectively. And as a result, your organization can get a robust system to deploy fast and safely. 🚀
6+
Gitploy is a tooling that helps your organization build the deployment system in minutes. It enables your organization **to deploy in the same manner** without worrying about the implementation details of delivering different types of applications (e.g., web, native). and **to deploy differently** for each application by a simple configuration file, respectively. And as a result, your organization can get a robust system to deploy fast and safely. 🚀
77

88
## Deploy in the same manner
99

@@ -19,7 +19,7 @@ Gitploy provides an intuitive UI similar to GitHub. Users can select one of the
1919

2020
## Deploy differently
2121

22-
Each application needs a customizable pipeline. If an organization has essential applications to deploy carefully, it should enforce a gateway like a review or deploy freeze window. And an organization chooses continuous delivery or continuous deployment for application.
22+
Each application needs a customizable pipeline. If an organization has essential applications to deploy carefully, it should enforce a gateway like a review or deploy freeze window. And also an organization chooses continuous delivery or continuous deployment for application.
2323

2424
Gitploy provides a way **to configure a pipeline with a simple, easy‑to‑read file for each repository (each environment).** The default path is `deploy.yml` at the root directory, but you can replace the file path in the settings tab of Gitploy.
2525

static/img/docs/statuses.png

29.3 KB
Loading

0 commit comments

Comments
 (0)