diff --git a/docs/_assets/pantheon-development-mode.png b/docs/_assets/pantheon-development-mode.png new file mode 100644 index 0000000..9871dee Binary files /dev/null and b/docs/_assets/pantheon-development-mode.png differ diff --git a/docs/deployment.md b/docs/deployment.md index daf4e61..ea4ace9 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -1,4 +1,59 @@ -Deployment -============================ +# Deployment -**TBD** +## Pantheon + +This repo includes a [Github workflow for deployment to Pantheon](../.github/workflows/deploy.pantheon.yml). +When enabled and configurated, this workflow will deploy to Pantheon when commits are added to the `main` branch. This workflow is disabled by default. See instructions below for configuration. + +### Deployment workflow +Pantheon maintains its own git remote containing the WordPress core files. To deploy, we: +1. Build our theme artifacts +1. Fetch the Pantheon remote repo +1. Copy our theme artifacts into the appropriate locations in the Pantheon codebase +1. Commit the changes to the Pantheon repo +1. Push to the Pantheon remote + +### Site setup + +1. See these instructions to [add a site to your Pantheon account](https://docs.pantheon.io/guides/getstarted/addsite). +1. Visit your Pantheon [site dashboard](https://docs.pantheon.io/guides/account-mgmt/workspace-sites-teams/sites#site-dashboard) and make sure your site's Development Mode is set to Git (it will likely be set to SFTP by default). +![Pantheon Development Mode](_assets/pantheon-development-mode.png) +1. Click the "Clone with Git" button, follow the instructions to clone the repo locally. +1. In the cloned repo, open the `wp-config.php` file. +1. At the top of the file, directly under the `.drush.in:2222`, where `` is a unique value for your site. +1. After running the above command, you should be prompted to accept the server's fingerprint. Type `yes` and press enter. +1. This will add an entry into your `~/.ssh/known_hosts` file. You will likely see a message that `shell request failed on channel 0`, this can be ignored. +1. Open the file at `~/.ssh/known_hosts`. +1. In the file, locate the line that contains a server address matching `PRODUCTION_REPO`. Copy this entire line and use it as the value for `KNOWN_HOSTS`. \ No newline at end of file