Skip to main content

Setup

Before diving into the deployment process, let’s set up some initial configurations:
These variables define crucial aspects such as the domain name, project repository, and the number of releases to keep.

Cloning Repository and Setup

The script starts by creating a unique release directory and clones the project repository into it:

Environment Setup

Next, the script copies the .env file from the project directory:

Running Laravel Commands

Dependency Installation and Build

The script installs NPM dependencies and generates necessary files:

Linking Deployment Directory

The script links the deployment directory to the current directory:

Clean Up

Lastly, the script performs clean-up tasks:

Full Script