PHPackages                             hexide-digital/gitlab-deploy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. hexide-digital/gitlab-deploy

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

hexide-digital/gitlab-deploy
============================

Prepare your project to deploy

v1.4.5(2y ago)312.9k↓50%5[3 PRs](https://github.com/hexidedigital/laravel-gitlab-deploy/pulls)1MITPHPPHP ^8.1CI passing

Since Apr 23Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/hexidedigital/laravel-gitlab-deploy)[ Packagist](https://packagist.org/packages/hexide-digital/gitlab-deploy)[ Docs](https://github.com/hexidedigital/laravel-gitlab-deploy)[ RSS](/packages/hexide-digital-gitlab-deploy/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (18)Versions (40)Used By (1)

Gitlab Deployer for Laravel
===========================

[](#gitlab-deployer-for-laravel)

[![Hexide digital Gitlab Deployer for Laravel](https://camo.githubusercontent.com/29278dbbaf01d4ced60b7752e20d484e8a0c0a079228a74f11e4c4b5174a46e4/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4769746c61622532304465706c6f796572253230666f722532304c61726176656c2e706e673f7468656d653d6461726b267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d2d2d6465762b6865786964652d6469676974616c2532466769746c61622d6465706c6f79267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d62792b4865786964652b4469676974616c266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d747275636b)](https://camo.githubusercontent.com/29278dbbaf01d4ced60b7752e20d484e8a0c0a079228a74f11e4c4b5174a46e4/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4769746c61622532304465706c6f796572253230666f722532304c61726176656c2e706e673f7468656d653d6461726b267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d2d2d6465762b6865786964652d6469676974616c2532466769746c61622d6465706c6f79267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d62792b4865786964652b4469676974616c266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d747275636b)

This package was created to optimize and improve a company's CI/CD in a Gitlab environment.

Requirements
------------

[](#requirements)

This package version requires [PHP](https://www.php.net/) 8.1 and supports [Laravel](https://laravel.com/) 9-11.

Available SSH agents on local machine and remote server.

Remote server must use GNU/Linux.

### Dependencies

[](#dependencies)

This package uses GitLab API to create CI/CD variables, powered by package [`graham-campbell/gitlab`](https://github.com/GrahamCampbell/Laravel-GitLab).

For deployment uses [`deployer/deployer`](https://deployer.org/).

To render beautiful console output uses [`nunomaduro/termwind`](https://github.com/nunomaduro/termwind).

Installation
------------

[](#installation)

### Add dependency

[](#add-dependency)

You can install this package using [Composer](https://getcomposer.org/):

```
composer require --dev hexide-digital/gitlab-deploy:^1.3
```

And if you are using composer version 2.4 and above, we recommend run the [`bump`](https://php.watch/articles/composer-bump) command to lock latest version:

```
composer bump "hexide-digital/gitlab-deploy"
```

After installation, this package will automatically register its service provider.

Usage
-----

[](#usage)

### Install and publish files

[](#install-and-publish-files)

To publish files for deployment and sample files run command bellow:

```
php artisan deploy:install
```

Examples of files to be copied are located in [this folder](https://github.com/hexidedigital/laravel-gitlab-deploy/tree/master/examples).

### Configurations and prepare access

[](#configurations-and-prepare-access)

Open [`.deploy/deploy-prepare.yml`](https://github.com/hexidedigital/laravel-gitlab-deploy/blob/master/examples/deploy-prepare.example.yml)and fill all needed options.

For most cases only need to be specified next options:

- **access token** for project repository ([see tip](#gitlab-api-access-token))
- project **id** ([see tip](#project-id))
- access to the **server**
- access to the **database**

But for every stage are available next options:

- repository url
- executor paths for `php` and `composer`
- access for the server
- access to the database
- access to the mail host (but can be omitted)

### Running configuration command

[](#running-configuration-command)

#### Basic launch

[](#basic-launch)

You can begin configuring your project deployment for specific **stage name** (i.e. for `dev` branch) by running:

```
php artisan deploy:gitlab dev
```

> Normally, the stage name must be the same as git branch name.

##### After command executing

[](#after-command-executing)

If all tasks completely executed, to enable auto-deployment go to `Settings` -&gt; `CI/CD` -&gt; `Variables` and change value for `CI_ENABLED` to `1`. After that, when you edit branch with configured deployment, Gitlab will run CI/CD Pipelines automatically.

#### Only-print launch

[](#only-print-launch)

If you want to manually execute commands or just prepare to future deployment, set a `--only-print` option when calling command. All commands and examples will be written to log files located in `.deploy/logs` folder. All that remains is to copy and execute commands from the file.

Tips for Gitlab
---------------

[](#tips-for-gitlab)

### Gitlab API access token

[](#gitlab-api-access-token)

In order for variables and other deployment options to be created, you need to grant access to the repository settings. This package uses the **Gitlab API** method using **Access Tokens**.

We recommend creating one personal access token and use for future deployment configurations. For this navigate to `Profile` -&gt; `Access Tokens` and press `Add new token`.

[![profile-add-new-token.png](media/add-new-token.png)](media/add-new-token.png)

Then fill the next options:

- **Token name** - name for you to identify token, i.e. `token_for_deployments`
- **Expiration date** - by default, automatically specified 1 month, but set longer time or remove this date
- **Scopes** - this package needs only `api` scope, but you can add more scopes

Then click `Create personal access token`.

[![creating-personal-access-token.png](media/creating-personal-access-token.png)](media/creating-personal-access-token.png)

After creating, copy this token and save in somewhere safe place, because you won't be able to access it again, and set in deploy config file

[![created-personal-access-token.png](media/created-personal-access-token.png)](media/created-personal-access-token.png)

---

If you don't want to use and create personal token, you can create project token with access only for repository.

To get Access Token follow this path `Settings` -&gt; `Access Tokens` and press `Add new token`.

[![project-add-new-token.png](media/add-new-token.png)](media/add-new-token.png)

Fill next options like bellow:

- **Token name** - any name, `deploy_dev`, `deploy_prod` etc.
- **Expiration date** - recommended to set 1-2 days (this will be enough)
- **Role** - select `mainterner` - this is necessary for the ability to change repository settings
- **Scopes** - select only `api`, for this package will be enough

Then click `Create project access token` to see the token, copy it and set in deploy config file.

### Project ID

[](#project-id)

Open the main page of the repository and on top you can see repository info and project id. It also can be copied with button on the right side.

[![project-id.png](media/project-id.png)](media/project-id.png)

Can I hire you guys?
--------------------

[](#can-i-hire-you-guys)

Yes! Say hi: We will be happy to work with you! Other [work we’ve done](https://hexide-digital.com)

### Follow us

[](#follow-us)

Follow us on [LinkedIn](https://www.linkedin.com/company/hexide-digital)or [Facebook](https://www.facebook.com/hexide.digital)

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance58

Moderate activity, may be stable

Popularity30

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 79.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~22 days

Recently: every ~13 days

Total

32

Last Release

792d ago

Major Versions

v0.5.0 → v1.0.0-alpha2022-08-07

0.x-dev → v1.0.0-RC.12022-12-13

PHP version history (4 changes)v0.1PHP ^7.4

v1.0.0-alphaPHP ^8.0

v1.0.0-betaPHP ^8.1

v0.6.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d71d9096f85a96307a91e8debf8408c91c3cd6bfae629f0d0628071777c539e?d=identicon)[yaapis](/maintainers/yaapis)

![](https://www.gravatar.com/avatar/1e642e47d6cdc24908bb88404a37ce5270904265c36a7b9ae045525282704bcf?d=identicon)[Oleksandr-Moik](/maintainers/Oleksandr-Moik)

![](https://www.gravatar.com/avatar/cfd6044c4e8e1a94db6b8d725e04cd78f730e35d95791d3ca8ee1bac3db6fbc7?d=identicon)[nxxxthing](/maintainers/nxxxthing)

---

Top Contributors

[![Oleksandr-Moik](https://avatars.githubusercontent.com/u/50796878?v=4)](https://github.com/Oleksandr-Moik "Oleksandr-Moik (137 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (21 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (14 commits)")[![andrey-helldar](https://avatars.githubusercontent.com/u/10347617?v=4)](https://github.com/andrey-helldar "andrey-helldar (1 commits)")

---

Tags

laraveldevdeployci-cdhexide-digitalgitlab-deploy

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/hexide-digital-gitlab-deploy/health.svg)

```
[![Health](https://phpackages.com/badges/hexide-digital-gitlab-deploy/health.svg)](https://phpackages.com/packages/hexide-digital-gitlab-deploy)
```

###  Alternatives

[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[laravel/vapor-cli

The Laravel Vapor CLI

31310.7M8](/packages/laravel-vapor-cli)[spatie/laravel-health

Monitor the health of a Laravel application

86910.0M83](/packages/spatie-laravel-health)[orchestra/workbench

Workbench Companion for Laravel Packages Development

8217.0M43](/packages/orchestra-workbench)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)[shopware/deployment-helper

Shopware deployment tools

19305.3k5](/packages/shopware-deployment-helper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
