Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

joseluisq/laravel-ci-deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

laravel-ci-deployment

Laravel 5.4 + Circle CI + Deployer example.

Requirements

  • Circle CI project connected with your Github or Bitbucket account.
  • SSH key configured in your server and added to your Circle CI project at PERMISSIONS > SSH Permissions.

Project configuration

Add deployer package to your laravel project as dev dependency.

composer require deployer/deployer --dev 

Copy the following files to your project's root:

  • deploy.php (For more advanced features check out Deployer documentation)
  • circle.yml (For more advanced features check out Circle CI documentation)

Environment Variables

Add environment variables to your Circle CI project at BUILD SETTINGS > Environment Variables. The values will be passed to deploy.php file later.

MY_DEPLOY_SERVER        #   Your server domain or IP.

MY_DEPLOY_USER          #   Your server username.

MY_DEPLOY_IDFILE        #   The Circle CI SSH key path. (~/.ssh/id_YOUR_HOSTNAME_VALUE)
                        #   
                        #   Example: Add your SSH server key at "PERMISSIONS > SSH Permissions" and 
                        #   in "Hostname" enter for example "myserver".
                        #   Then, the "MY_DEPLOY_IDFILE" value should be 
                        #   "~/.ssh/id_myserver" (adding the "id_" prefix)

MY_DEPLOY_PATH          #   Your server deploy path.

MY_DEPLOY_REPOSITORY    #   Your git repository path. 
                        #   E.g. git@github.com:joseluisq/myrepo.git 

Note: The "double quotes" (in this example) are illustrative only.

Test

Finally, send your commit ! 👍

Releases

No releases published

Packages

No packages published

Languages