Note: This article has been published on Symfony official blog. Read the source. Symfony’s documentation is an open source project with more than 800 contributors. That’s great! But our goal is to always make it easier to contribute and faster to merge in changes. And today, we’ve started doing something really cool to improve our workflow: integration with Platform.sh. Platform.sh is a hosting solution that provides out-of-the-box continuous deployment for Symfony, Drupal and any other PHP applications. It extends the concept of a Git branch at the infrastructure level. Basically, this means that it’s easy to deploy every branch and/or Pull Request to its own URL. Symfony’s documentation is written in Sphinx (Markdown on steroids) with linking, complex code blocks and more. That gives us a lot of flexibility, but also causes 2 major problems:Documentation Index
Fetch the complete documentation index at: https://developer.upsun.com/llms.txt
Use this file to discover all available pages before exploring further.
- When someone makes a pull request to the docs, they can’t immediately see how it will render.
- It’s tough to review, since it takes too much time for a reviewer to pull down the branch, compile it locally, then open it up in a browser.
How is the madness possible?
First, Platform.sh was awesome enough to setup our environment for #! If you see them on Twitter or at a conference, give them a big thank you! Second, the only thing required to integrate with Platform.sh is to add a configuration file called.platform.app.yaml in your repository which describes how the code should be built - similar to .travis.yml . That - and a GitHub webhook - were enough to start automatically deploying pull requests.
Third, WouterJ (core docs contributor) created a symfony.com-like theme to make the previews as realistic as possible.
So, next time you make a pull request to the docs, check out how it looks!