|
| 1 | +Drupalize.Me Import and Deployment Workflow |
| 2 | +=========================================== |
| 3 | + |
| 4 | +This file documents how User Guide content is built and imported for |
| 5 | +Drupalize.Me. |
| 6 | + |
| 7 | +For Drupalize.Me we maintain a clone of the Drupal.org project https://www.drupal.org/project/user_guide, and a site-specific branch (drupalizeme_live) that contains some additional files needed for the build and deployment process. |
| 8 | + |
| 9 | +Our custom additions include: |
| 10 | + |
| 11 | +- GitHub actions workflow to build and deploy the user guide to Drupalize.Me. This works in combination with code in the custom dme_import module on the Drupalize.Me site. |
| 12 | +- A mapping of Drupalize.Me videos hosted on SproutVideo to the user guide content. This is used to replace the normal YouTube videos on the guide pages with Drupalize.Me hosted ones. This lives in user_guide_video_map.csv. |
| 13 | + |
| 14 | +**These customizations ONLY EXIST IN THE drupalizeme_live BRANCH. And should not get merged into the 11.x or other drupal.org branches.** |
| 15 | + |
| 16 | +Overview |
| 17 | +-------- |
| 18 | + |
| 19 | +This repository has a GitHub Actions workflow: |
| 20 | + |
| 21 | + .github/workflows/deploy-user-guide.yml |
| 22 | + |
| 23 | +With two jobs: |
| 24 | + |
| 25 | +1. Build job |
| 26 | + - Starts DDEV. |
| 27 | + - Runs scripts/mkfeeds.sh inside the DDEV web container. |
| 28 | + - Builds English HTML feed output from source/en. |
| 29 | + - Generates output/html_feed/en/tutorial-changed-dates.csv. |
| 30 | + - Uploads artifacts for deploy. |
| 31 | + |
| 32 | +2. Deploy job |
| 33 | + - Downloads build artifacts. |
| 34 | + - Uses rsync over Pantheon SSH to upload files. |
| 35 | + - Runs Terminus Drush commands to import migrations and clear cache. |
| 36 | + |
| 37 | + |
| 38 | +Branch Model (Important) |
| 39 | +------------------------ |
| 40 | + |
| 41 | +Deployment is triggered only from the `drupalizeme_live` branch. |
| 42 | + |
| 43 | +The upstream Drupal User Guide content flow is: |
| 44 | + |
| 45 | +1. Changes land on `11.x` (from drupal.org sync work). |
| 46 | +2. Those changes are merged into `drupalizeme_live`. |
| 47 | +3. `drupalizeme_live` is pushed to the Drupalize.Me GitHub repository. |
| 48 | +4. GitHub Actions runs and deploys/imports the updated guide. |
| 49 | + |
| 50 | +`drupalizeme_live` contains deployment-specific additions that are not part of |
| 51 | +the plain `11.x` branch. Examples include CI/CD and environment wiring used for |
| 52 | +Drupalize.Me deployment. |
| 53 | + |
| 54 | + |
| 55 | +Required Secrets |
| 56 | +---------------- |
| 57 | + |
| 58 | +Set these repository secrets in GitHub Actions: |
| 59 | + |
| 60 | +- PANTHEON_SSH_KEY |
| 61 | +- TERMINUS_MACHINE_TOKEN |
| 62 | + |
| 63 | +Without these, deploy/import steps cannot run. |
| 64 | + |
| 65 | + |
| 66 | +Regular Update Procedure |
| 67 | +------------------------ |
| 68 | + |
| 69 | +Use this sequence whenever User Guide updates need to be deployed to |
| 70 | +Drupalize.Me: |
| 71 | + |
| 72 | +1. Update local branches: |
| 73 | + - `git checkout 11.x` |
| 74 | + - `git pull` |
| 75 | +2. Merge into deployment branch: |
| 76 | + - `git checkout drupalizeme_live` |
| 77 | + - `git merge 11.x` |
| 78 | +3. Resolve conflicts, test if needed, and commit merge. |
| 79 | +4. Push deployment branch: |
| 80 | + - `git push origin drupalizeme_live` |
| 81 | +5. Confirm the GitHub Actions workflow succeeds. |
| 82 | + |
| 83 | +If needed, run the workflow manually with `workflow_dispatch` from the Actions |
| 84 | +tab. |
| 85 | + |
| 86 | + |
| 87 | +Notes |
| 88 | +----- |
| 89 | + |
| 90 | +- Build tooling dependencies come from the DDEV web container which is part of the Drupal.org project. |
| 91 | +- The workflow currently targets English source (`source/en`) for feed output. |
| 92 | +- Pantheon import commands are executed via Terminus remote Drush. |
0 commit comments