{"id":16362270,"url":"https://github.com/dieterholvoet/gitlab-ci-deploy","last_synced_at":"2026-03-18T19:09:59.812Z","repository":{"id":92667043,"uuid":"255570783","full_name":"DieterHolvoet/gitlab-ci-deploy","owner":"DieterHolvoet","description":"Reusable config for simple, SSH based deploys using GitLab CI","archived":false,"fork":false,"pushed_at":"2025-05-26T21:39:19.000Z","size":53,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-29T14:27:01.299Z","etag":null,"topics":["deployment","deployment-automation","dotenv","gitlab-ci"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DieterHolvoet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-04-14T09:50:06.000Z","updated_at":"2025-05-26T21:39:22.000Z","dependencies_parsed_at":"2023-11-13T00:21:56.728Z","dependency_job_id":"a92903e7-d0c0-4bd8-861a-3f7d12dd374f","html_url":"https://github.com/DieterHolvoet/gitlab-ci-deploy","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/DieterHolvoet/gitlab-ci-deploy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DieterHolvoet%2Fgitlab-ci-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DieterHolvoet%2Fgitlab-ci-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DieterHolvoet%2Fgitlab-ci-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DieterHolvoet%2Fgitlab-ci-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DieterHolvoet","download_url":"https://codeload.github.com/DieterHolvoet/gitlab-ci-deploy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DieterHolvoet%2Fgitlab-ci-deploy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28802061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T03:44:14.111Z","status":"ssl_error","status_checked_at":"2026-01-27T03:43:33.507Z","response_time":168,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deployment","deployment-automation","dotenv","gitlab-ci"],"created_at":"2024-10-11T02:23:46.191Z","updated_at":"2026-01-27T04:31:40.590Z","avatar_url":"https://github.com/DieterHolvoet.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"gitlab-ci-deploy\n======================\n\n![Latest Stable Version](https://img.shields.io/github/v/release/DieterHolvoet/gitlab-ci-deploy)\n![Total Downloads](https://img.shields.io/github/downloads/DieterHolvoet/gitlab-ci-deploy/total)\n![License](https://img.shields.io/github/license/DieterHolvoet/gitlab-ci-deploy)\n\n\u003e Reusable config for simple, SSH based deploys using [GitLab CI/CD]((https://docs.gitlab.com/ee/ci)).\n\n## Requirements\n- A server with SSH access, bash \u0026 rsync\n- A repository hosted on Gitlab with the following files: `.gitlab-ci` and \n `.deploy/.rsync-filter`. The [examples](#examples) can be used for \n inspiration.\n\n## Features\n### Run pipelines using GitLab CI/CD\nAll this functionality is powered by **GitLab CI/CD**, check their \n [documentation](https://docs.gitlab.com/ee/ci/) for more information.\n\n### Deploy your files using rsync\nThe deployment of your files is done using \n [rsync](http://manpages.ubuntu.com/manpages/eoan/en/man1/rsync.1.html):\n- One-way sync, left to right\n- Extraneous files are deleted from destination dirs\n- Filter rules can be defined in the `.deploy/.rsync-filter` file.\n\nTo minimise downtime, the file sync will happen to a copy of your files \n in a new _release_. After finishing the sync, the active release will be\n changed by replacing the symlink. A couple of settings can be changed \n through variables:\n- `RELEASES_FOLDER`: the name of the folder in which all releases are \n    stored (default: `releases`)\n- `CURRENT_RELEASE_FOLDER`: the name of the folder to which the active \n    release is symlinked (default: `current`)\n- `KEEP_RELEASES`: the amount of releases that should be kept (minimum: 1,\n    default: 2)\n\n\nA couple environment variables are required, check the [documentation](https://docs.gitlab.com/ee/ci/variables/) for ways to define them.\n- `DEPLOY_SERVER_HOST`: the host of the server\n- `DEPLOY_SERVER_USER`: the user used for SSH'ing\n- `DEPLOY_SSH_PRIVATE_KEY`: the private key used for SSH'ing\n- `DEPLOY_PATH`: the path the files should be deployed to\n\n### Run a server-side script after deploy\nIf a `.deploy/post-deploy.sh` file exists, it will be executed on the \n server after the deployment is finished. The current directory will be \n equal to `DEPLOY_PATH`.\n\n### Automatically generate .env files\nA script is provided to automatically generate a .env file and serve it as\n an artifact in your pipeline. To add this functionality to your pipeline, \n create a new job extending `.create_dotenv`:\n \n ```yaml\n dotenv:\n   extends:\n     - .create_dotenv\n   stage: build\n ```\n \nThe script will take a `.env.example` file as starting point and fill in \n the values using current environment variables. There are multiple ways \n to define your environment variables, check the \n [documentation](https://docs.gitlab.com/ee/ci/variables/) for more \n information.\n\n### Create a Sentry release\nA script is provided to create a new Sentry release. To add this functionality to your pipeline, \n create a new job extending `.create_sentry_release` and make sure `SENTRY_AUTH_TOKEN`, `SENTRY_DSN`, `SENTRY_ORG` and \n `SENTRY_PROJECT` are available as environment variables. Please refer to the \n [Sentry CLI docs](https://docs.sentry.io/product/cli/configuration/#configuration-values) for more information.\n\n## Examples\nSome examples are provided to get you started quickly.\n\n### [`deploy-only`](examples/deploy-only)\n- simple, deploy-only setup\n\n### [`drupal-8`](examples/drupal-8)\n- Drupal 8 website\n- jobs for building a custom theme, .env file, installing Composer dependencies and creating a Sentry release after deploying\n- a set of Drush commands are executed after deploying.\n\n### [`octobercms`](examples/octobercms)\n- OctoberCMS website\n- jobs for building a custom theme, .env file and installing Composer dependencies\n- a set of Artisan commands are executed after deploying.\n- staging environment which is automatically built and deployed after pushing to a [Gitflow-style](https://nvie.com/posts/a-successful-git-branching-model) release branch\n- production environment which is automatically built, but manually deployed after pushing a [Semantic Versioning-style](https://semver.org) tag.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdieterholvoet%2Fgitlab-ci-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdieterholvoet%2Fgitlab-ci-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdieterholvoet%2Fgitlab-ci-deploy/lists"}