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

Commit 87f6cfc

Browse files
author
Noah Lee
authored
Add the documentation for auto-deployment (#253)
1 parent 12932f7 commit 87f6cfc

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

docs/references/deploy.yml.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Field |Type |Required |Description
1717
`required_contexts` |*[]string* |`false` |This field allows you to specify a subset of contexts that must be success.
1818
`payload` |*object* or *string* |`false` |This field is JSON payload with extra information about the deployment.
1919
`production_environment` |*boolean* |`false` |This field specifies whether this runtime environment is production or not.
20-
`deployable_ref` |*string* |`false` |This field specifies which the ref(branch, SHA, tag) is deployable or not. It supports the regular expression, [re2](https://github.com/google/re2/wiki/Syntax) by Google, to match the ref.
21-
`auto_deploy_on` |*string* |`false` |This field controls auto-deployment behaviour given a ref(branch, SHA, tag). It supports the regular expression, [re2](https://github.com/google/re2/wiki/Syntax) by Google, to match the ref.
20+
`deployable_ref` |*string* |`false` |This field specifies which the ref(branch, SHA, tag) is deployable or not. It supports the regular expression ([re2]((https://github.com/google/re2/wiki/Syntax))).
21+
`auto_deploy_on` |*string* |`false` |This field controls auto-deployment behaviour given a ref(branch, SHA, tag). If any new push events are detected on this event, the deployment will be triggered. It supports the regular expression ([re2](https://github.com/google/re2/wiki/Syntax)). E.g. `refs/heads/main` or `refs/tags/v.*`
2222
`review` |*[Review](#review)* |`false` |This field configures review.
2323

2424
## Review

docs/tasks/usecases.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@ envs:
3737
production_environment: true
3838
```
3939

40+
## Auto deployment
41+
42+
If you want to enable the auto-deployment when the pull request is merged into the main branch, you should configure the `auto_deploy_on` field like the below.
43+
44+
```yaml
45+
envs:
46+
- name: production
47+
auto_merge: true
48+
required_contexts: []
49+
auto_deploy_on: refs/heads/main
50+
deployable_ref: main
51+
production_environment: true
52+
```
53+
4054
## Questions?
4155

4256
We are always happy to help with questions you might have. You can post questions or comments to our [community](https://github.com/gitploy-io/gitploy/discussions).

0 commit comments

Comments
 (0)