A repository template for new Drupal 8 Pantheon sites based on the https://github.com/pantheon-systems/example-drops-8-composer repository.
Our front-end developer team has put together a Drupal 8 starter theme called Starterlight to use for new Drupal 8 theming projects. See the Starterlight project page on GitHub for documentation.
This repository is ready to be integrated with Probo.CI to install a fresh copy of Drupal 8. Additional configuration to the .probo.yaml file is required to manage configuration imports after the site has been installed.
Below you can find the notable changes between our repository and the Pantheon example-drops-8-composer repo.
- The .gitignore file is modified to allow scaffolding, vendor, core, and all other composer managed files.
- The .gitignore file is modified to ignore composer dev dependencies.
- Removed Circle.CI, GitLab, and Bitbucket functionality, as we typically use GitHub with Jenkins.
- Removed drupal console. We use drush.
- Added some commonly used contrib modules.
- Added Environment Indicator module settings for local, DDEV, and Pantheon environments.
- Added composer-manifest Composer plugin to track all installed package and dependency versions.
Below you can find step by step documentation for creating a new Drupal 8 project repository controlled by Composer that lives on GitHub and is hosted on Pantheon.
-
Create a new GitHub repo for the project site using this repository as a template.
-
Ensure you have a Pantheon Machine Token.
-
Login to Pantheon using Terminus and your machine token in your Terminal.
terminus auth:login --machine-token YOUR_MACHINE_TOKEN
-
Create a new empty Pantheon site using Terminus. Replace
ORG_NAME
with your Pantheon organization name. Example:zivtech
terminus site:create SITENAME LABEL empty --org=ORG_NAME --no-interaction
-
Goto the new Pantheon site page once the Terminus command reports
[notice] Deployed CMS
. -
Git add the Pantheon remote repo URL to the GitHub repo you cloned. Replace
PANTHEON_GIT_REPO
with Pantheon repo connection info from the Pantheon site page.git remote add pantheon PANTHEON_GIT_REPO
-
Git pull the Pantheon remote with
--allow-unrelated-histories
and fix any merge conflicts.git pull pantheon master --allow-unrelated-histories
-
Git force push to the Github remote master branch.
git push --force
-
Git force push to the
pantheon master
remote branch.git push --force pantheon master
-
Set the Pantheon site Development Mode to SFTP to install the Drupal 8 site or import an existing database through the Pantheon Database/Files tab.
-
Click the Visit Development Site button to either install the Drupal 8 site or verify the DB import was successful.
-
Upload a tarball or zip archive of the files dir through the Pantheon UI or set the site to SFTP Development Mode and upload the contents of the files directory using the SFTP Connection Info available for the site.