Deploy Laravel for
Bitbucket Pipelines
View on GitHub
Step 1: Add the deployment script to your project
Download and extract the deployment script.
Add the bitbucket-pipelines.yml
file and the .bitbucket/
directory to the root of your project.
This is how the deployment script is structured:
-
bitbucket-pipelines.yml
- This file defines the Bitbucket pipeline. It tells Bitbucket when to start a pipeline and what it should do.
-
.bitbucket/deployment/prepare.sh
- This bash script prepares the runner to run the deployment. This script is executed inside a Bitbucket Pipelines runner.
-
.bitbucket/deployment/deploy.sh
- This bash script is executed on the remote server. It performs the actual deployment.
-
.bitbucket/deployment/hooks/
- This directory contains hooks to customize your deployment. These hooks perform actions such as caching the config, flushing opcache, and restarting the queue.