- Runs
npm run build:production
in sage9 theme directory to generate dist/ directory - Uploads dist/ directory to remote server and places in theme directory
- Runs
composer install
within sage9 theme directory to install required libs - Has custom path for
composer
command to point to non-default server php and/or composer path
- ./config/deploy.rb
- ./config/deploy/production.rb
- ./config/deploy/staging.rb
set :application, 'projectname.com'
## Project name, usually domainset :user, 'username'
## Username for account on remote hostset :server, 'XXX.XXX.XX.XX'
## Remote Server IPset :repo_url, 'git@github.com:GITUSERNAME/GITPROJECTNAME.GIT'
## Path to master reposet :theme_dir, 'THEME_DIR'
## Theme directory name
set :webroot, 'web'
## Path to server's webroot if different from bedrock's default of 'web'set :branch, :master
## Sets default repo branch you can override in individual ./config/deploy/##stage##.rb )set :keep_releases, 10
## Number of releases to keep for rollbacksset :log_level, :info
## Change to 'debug' if you need more info output in cliSSHKit.config.command_map[:composer] = "/opt/cpanel/ea-php70/root/usr/bin/php /usr/local/bin/composer"
## Maps composer command to custom PHP path / full composer path. Remove/Adjust if un/needed
note: you should stage/commit all necessary changes and push to remote repo prior to running each deploy, otherwise they wont show up on the remote server
cap staging deploy:check
and fix any errors- Once errors are fixed try to deploy by running:
cap staging deploy
- Then once you're really ready ready deploy to production:
cap production deploy
🍻