diff --git a/docs/ci-cd.md b/docs/ci-cd.md index c0f8e5ce..517f7765 100755 --- a/docs/ci-cd.md +++ b/docs/ci-cd.md @@ -34,15 +34,18 @@ deploy: - master ``` -###Deployment concurrency +### Deployment concurrency + Only one deployment job runs at a time with the [`resource_group` keyword](https://docs.gitlab.com/ee/ci/yaml/index.html#resource_group) in .gitlab-ci.yml. In addition, you can ensure that older deployment jobs are cancelled automatically when a newer deployment runs by enabling the [Skip outdated deployment jobs](https://docs.gitlab.com/ee/ci/pipelines/settings.html#skip-outdated-deployment-jobs) feature. -###Deploy code +### Deploy code + Since by default every GitLab CI job already clone the repo, you could use [`rsync`](contrib/rsync.md#usage) task instead of `deploy:update_code` to upload the code from the job to the host. -###Deploy secrets +### Deploy secrets + Since it is not recommended pushing secrets in the repository, you could use a GitLab variable to store them. Many frameworks use dotenv to store secrets, let's create a GitLab file variable named `DOTENV`, so it can be deployed along with the code.