PHPackages                             bnhashem/deploy-bitbucket - 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. bnhashem/deploy-bitbucket

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

bnhashem/deploy-bitbucket
=========================

Deploy your project to server using bitbucket

V1.0.0(4y ago)016MITPHPPHP ^7.3|^8.0

Since Nov 27Pushed 4y ago1 watchersCompare

[ Source](https://github.com/BNhashem16/deploy-bitbucket)[ Packagist](https://packagist.org/packages/bnhashem/deploy-bitbucket)[ Docs](https://github.com/BNhashem16/deploy-bitbucket)[ GitHub Sponsors](https://github.com/bnhashem)[ RSS](/packages/bnhashem-deploy-bitbucket/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (12)Versions (2)Used By (0)

Deploy Bitbucket
================

[](#deploy-bitbucket)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9dfd7d7c3cfca7c80532373bcca94999935d3b741fc0061bd54116fdce58cb99/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626e68617368656d2f6465706c6f792d6269746275636b65742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bnhashem/deploy-bitbucket)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/9a37fab5c4e6e9ac17e7e6a11d8faed9c970dccd6fe67e22b334b8098de64aef/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f626e68617368656d2f6465706c6f792d6269746275636b65742f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/bnhashem/deploy-bitbucket/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/5aab13820bf87f0487ef0589b6c5df0fa278bd54cc367b6c6bd86931c5b1523c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626e68617368656d2f6465706c6f792d6269746275636b65742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bnhashem/deploy-bitbucket)

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

[](#installation)

You can install the package via composer:

```
composer require bnhashem/deploy-bitbucket
```

You can publish and run the bitbucket yml file with:

```
php artisan vendor:publish --provider="Bnhashem\DeployBitbucket\DeployBitbucketServiceProvider"
```

- This command publish this files
    - bitbucket.php
    - bitbucket-pipelines.yml
    - deployment-exclude-list.txt
    - Envoy.blade.php

---

#### bitbucket-pipelines.yml

[](#bitbucket-pipelinesyml)

- you can set your repositories setthing from this file, you can manage branches and tasks.

Config File Optimizations
-------------------------

[](#config-file-optimizations)

- can find this file in project\_name/config/bitbucket.php

VariableTypeDescription`clearCache``bool`**Required**. set it true if you want to clear cache`clearConfig``bool`**Required**. set it true if you want to clear config`clearRoute``bool`**Required**. set it true if you want to clear route`clearView``bool`**Required**. set it true if you want to clear view`cleanupVersions``bool`**Required**. set it true if you want to clear oldest version of your code`cleanupVersionsCount``integer`**Required**. how many versions do you want to delete it`migration`, `migrate:fresh`, `migrate:refresh --seed`, `migrate:refresh --seed`, `migrate:refresh``string`**Required**. you can but any artisan migrations commands such as 'migrate', 'migrate:refresh --seed', but be carful don't write 'php artisan we handle it from our side'`additionalTasks``array`**Required**. put your custom commands in this array, Separate commands with a commaBitbucket Optimizations
-----------------------

[](#bitbucket-optimizations)

##### 1. Go to Repository setting

[](#1-go-to-repository-setting)

- Note: Make sure you are admin to show this tab

##### 2. Choose Deployments tab

[](#2-choose-deployments-tab)

[![App Screenshot](https://github.com/BNhashem16/deploy-bitbucket/raw/main/screenshots/1.PNG?raw=true)](https://github.com/BNhashem16/deploy-bitbucket/blob/main/screenshots/1.PNG?raw=true)

##### 2. Choose which environment you want to deploy your code

[](#2-choose-which-environment-you-want-to-deploy-your-code)

[![App Screenshot](https://github.com/BNhashem16/deploy-bitbucket/raw/main/screenshots/2.PNG?raw=true)](https://github.com/BNhashem16/deploy-bitbucket/blob/main/screenshots/2.PNG?raw=true)Note: Adding this Variable name `DEPLOY_PATH` with the project path value `/home/username/public_html/project_name`

##### 3. Choose Repository variables tab

[](#3-choose-repository-variables-tab)

[![App Screenshot](https://github.com/BNhashem16/deploy-bitbucket/raw/main/screenshots/3.PNG?raw=true)](https://github.com/BNhashem16/deploy-bitbucket/blob/main/screenshots/3.PNG?raw=true)Note: Adding this Variable name **1.** `DEPLOY_HOST` Adding your host value `87.1833.487.980`**2.** `DEPLOY_USER` Adding your username value `username_value`

##### 4. Choose Access Keys tab from General section

[](#4-choose-access-keys-tab-from-general-section)

[![App Screenshot](https://github.com/BNhashem16/deploy-bitbucket/raw/main/screenshots/4.PNG?raw=true)](https://github.com/BNhashem16/deploy-bitbucket/blob/main/screenshots/4.PNG?raw=true)Note: Adding your server public key

##### 5. Choose SSH Keys tab from Pipeline section

[](#5-choose-ssh-keys-tab-from-pipeline-section)

[![App Screenshot](https://raw.githubusercontent.com/BNhashem16/deploy-bitbucket/main/screenshots/5.PNG)](https://raw.githubusercontent.com/BNhashem16/deploy-bitbucket/main/screenshots/5.PNG)Notes:

- Copy this public key to ~/.ssh/authorized\_keys on the remote host.
- Adding Host address
- Click Fetch

---

Server Optimizations
--------------------

[](#server-optimizations)

##### 1. create your folder of your project

[](#1-create-your-folder-of-your-project)

##### 2. Go to the project directory

[](#2-go-to-the-project-directory)

Using the Linux terminal, use the following commands to create the directory structure.

```
  cd /path/to/project_name
  mkdir -p storage/framework/{sessions,views,cache}
```

You also need to set permissions to allow Laravel to write data in this directory.

```
chmod -R 777 framework
chown -R username:username /path/to/your/project_name/storage
```

##### 3. copy .env file of your project and check variables values

[](#3-copy-env-file-of-your-project-and-check-variables-values)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [bnhashem](https://github.com/BNhashem16)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1627d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/40724217?v=4)[Ahmed Mohamed salah](/maintainers/bnhashem)[@bnhashem](https://github.com/bnhashem)

---

Top Contributors

[![BNhashem16](https://avatars.githubusercontent.com/u/49618985?v=4)](https://github.com/BNhashem16 "BNhashem16 (1 commits)")

---

Tags

laravelbitbucketdeploybnhashemAhmed HashemHashemdeploy-bitbucket

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/bnhashem-deploy-bitbucket/health.svg)

```
[![Health](https://phpackages.com/badges/bnhashem-deploy-bitbucket/health.svg)](https://phpackages.com/packages/bnhashem-deploy-bitbucket)
```

###  Alternatives

[spatie/laravel-horizon-watcher

Automatically restart Horizon when local PHP files change

2631.9M](/packages/spatie-laravel-horizon-watcher)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[timokoerber/laravel-one-time-operations

Run operations once after deployment - just like you do it with migrations!

6481.7M11](/packages/timokoerber-laravel-one-time-operations)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)

PHPackages © 2026

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