In this screencast we’ll quickly create a DDEV-Live site from a local project, then make changes, push them up to a pull request on GitHub, then get the DDEV-Live bot to create a preview URL and site specific to that PR.
What is DDEV-Live?
DDEV-Live is our managed hosting service. You can interact with it via ddev-live command-line client and via pushing to GitHub or GitLab. Currently it supports Drupal, TYPO3, and WordPress, with more platforms coming in the future.
What is the Preview Feature?
When interacting with customers and colleagues or collaborators, we often need to be able to show our work as it progresses, and the DDEV-Live Preview Feature does just this. You create a pull request with new code, and easily add a preview site to it, with its own resources, database, and code. The preview URL is provided right on the pull request.
Outline of the Screencast
In the screencast we:
- Create a site from a running DDEV-Local project,
ddev-live create site drupal <sitename> --drupal-version=9 --branch=main --docroot=web --run-composer-install --github-repo=rfay/<reponame>
- Wait for the site creation to complete.
- Push the user-generated files up to the new site with
cd web/site/default/files && ddev-live push files <sitename>
- Push the database (from the local project) up with
ddev-live push db d9demo <database_dumpfile>
- Wait for the pushes to complete and then verify the new site.
- Create a new branch and add some new code in the DDEV-Local project. In this case we’re adding a theme by doing
ddev composer require drupal/vani
- Add the code, make a commit, push the new branch, and create a pull request.
- The DDEV-Live bot immediately gives us instructions on the PR, suggesting that we submit a comment with the text
/ddev-live-create-preview. Do it, and a preview site is created.
- Verify that the new theme is available and enable it on the preview site.
- When done, pull the pull request and note that DDEV-Live automatically deletes the preview site.
Read more about how to use DDEV-Live in the documentation.