See ataylorme/ataylorme-wordpress
for a current example.
.+?:
.+??.
??? .
+???.
+?????????=.
.???????????.
.????????????.
########### ########
############.#######.
####### #### .......
######## #### #######
#########.####.######
###### ...
#######.??.##########
#######~+??.#########
########.??..
#########.??.#######.
#########.+?? ######.
.+?.
.????????????.
+??????????,
.????++++++.
????.
.???,
.~??.
.??
.?,.
This repository is an extension of pantheon-systems/example-wordpress-composer showning an example of an advanced WordPress deployment workflow on Pantheon integrating tools such as:
The old version of this example used CircleCI 1.0 and did a lot of steps that the Terminus build tools plugin now does manually. This has been deprecated in favor of an example based on CircleCI 2.0 and Example WordPress Composer. The circle-ci-1 branch has this version archived for reference only.
You will need to add the following environment variables in the CircleCI UI. See https://circleci.com/docs/2.0/environment-variables/ for details.
TERMINUS_SITE
: Name of the Pantheon site to run tests on, e.g. my_siteTERMINUS_TOKEN
: The Pantheon machine tokenGITHUB_TOKEN
: The GitHub personal access tokenGIT_EMAIL
: The email address to use when making commitsTEST_SITE_NAME
: The name of the test site to provide when installing.ADMIN_PASSWORD
: The admin password to use when installing.ADMIN_EMAIL
: The email address to give the admin when installing.In order to develop the site locally a few steps need to be completed. These steps only need to be performed once, unless noted.
First, take care of the one-time setup steps below:
.lando.yml
and update name
, site
and id
to match those of your Pantheon site
Then, use lando start
and lando stop
to start and stop the local development environment.
After cloning this repository you will need to download dependencies. This can be done through Lando with the commands below:
lando composer-install
lando gulp-build
Tests can also be run locally on Lando with the commands below:
lando composer local-behat
lando composer unit-test
All of these steps are a one-time step unless noted.
sample.env
to .env
and update the values accordingly./bin/install-composer-dependencies.sh
to install PHP dependencies with Composer
composer update
will need to be ran if composer.json
has been changed./.circleci/build-gulp-assets.sh
to compile theme assets Note: if you are using Lando for local development prefix all of the commands below with lando
to run them on Lando instead of your local system. For example, npm run dev
would become lando npm run dev
.
composer update
will need to be ran after any changes to composer.json
npm run gulp
will need to be ran in web/wp-content/themes/twentyseventeen-child
after any changes to web/wp-content/themes/twentyseventeen-child/source
files
npm run watch
can be used to build the production CSS and JavaScript files, watch for changes in the source files, and rebuild the production files after a change.npm run dev
is the same as above but it also starts a BrowserSync instance for automated reloading. Be sure to update the url
export in web/wp-content/themes/twentyseventeen-child/gulp/constants.js
with your local development URL. Unless you are using Lando, in which case leave it set to https://nginx/
.npm install
will need to be ran after any changes to web/wp-content/themes/twentyseventeen-child/package.json