Skip to content

Instantly share code, notes, and snippets.

@fxcosta
Created October 31, 2017 12:48
Show Gist options
  • Select an option

  • Save fxcosta/5a1c0019776b81ba2b9ebd2f9e738ba2 to your computer and use it in GitHub Desktop.

Select an option

Save fxcosta/5a1c0019776b81ba2b9ebd2f9e738ba2 to your computer and use it in GitHub Desktop.
Gitlab CI + PHPloy for incremental deploy using FTP
stages:
- deploy
deploy_to_production:
image: php:5.6-cli
stage: deploy
only:
- master
environment: production
before_script:
- apt-get update -yqq
- apt-get install git zip unzip curl wget openssh-client -yqq
- wget --quiet https://github.com/banago/PHPloy/archive/master.zip
- unzip -qq master.zip
- mv ./PHPloy-master/dist/phploy.phar phploy
script:
- php phploy -s production
when: manual
[production]
scheme = ftp
path = /your-project-folder
host = ftp.host.com
port = 21
branch = master
exclude[] = '.env.example'
exclude[] = '.gitignore'
exclude[] = '.gitlab-ci.yml'
exclude[] = 'phploy.ini'
exclude[] = 'README.md'
exclude[] = 'vendor/*'
exclude[] = 'library/*'
exclude[] = '.Idea/*'
exclude[] = '.history/*'
exclude[] = 'public/vendor/*'
exclude[] = 'public/index.php'
exclude[] = 'application/configs/lang/*'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment