Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare Platform.sh configuration files. #5519

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .platform.app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This file describes an application. You can have multiple applications
# in the same project.

# The name of this app. Must be unique within a project.
name: symfonydocs

# The toolstack used to build the application.
type: "php"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if that matters here, but what about using python instead (we don't have any PHP code to execute)?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the only language supported by Platform.sh at the moment. It doesn't actually matter since Sphinx builds a static HTML website.


build:
flavor: "composer"

# The configuration of app when it is exposed to the web.
web:
# The public directory of the app, relative to its root.
document_root: "/_build/html"
index_files:
- index.html
whitelist:
- \.html$
- \.txt$

# CSS and Javascript.
- \.css$
- \.js$
- \.hbs$

# image/* types.
- \.gif$
- \.png$
- \.ico$
- \.svgz?$
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove tiff, wbmp, jpg, jpeg, jng and bmp from this list.


# fonts types.
- \.ttf$
- \.eot$
- \.woff$
- \.otf$

# robots.txt.
- /robots\.txt$

# The size of the persistent disk of the application (in MB).
disk: 512

# Build time dependencies.
dependencies:
python:
sphinx: ">=1"

# The hooks that will be performed when the package is deployed.
hooks:
build: |
pip install git+https://github.com/fabpot/sphinx-php.git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Sphinx extension is registered as a Git submodule. Could it simply be reused here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, not actually sure if it's best.

make html
16 changes: 16 additions & 0 deletions .platform/routes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
http://www.{default}/:
to: http://{default}/
type: redirect
http://{default}/:
cache:
cookies:
- '*'
default_ttl: 0
enabled: true
headers:
- Accept
- Accept-Language
ssi:
enabled: false
type: upstream
upstream: symfonydocs:php
1 change: 1 addition & 0 deletions .platform/services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Keeping this file empty to not deploy unused services.
5 changes: 5 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ Contributing
We love contributors! For more information on how you can contribute to the
Symfony documentation, please read
[Contributing to the Documentation](https://symfony.com/doc/current/contributing/documentation/overview.html)

Platform.sh
-----------

Pull requests are automatically built by [Platform.sh](https://platform.sh).
22 changes: 22 additions & 0 deletions contributing/documentation/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,27 @@ steps to contribute to the Symfony documentation, which you can use as a

You guessed right: after all this hard work, it's **time to celebrate again!**


Review your changes
-------------------

Every GitHub Pull Request is automatically built and deployed by `Platform.sh`_
on a single environment that you can access on your browser to review your
changes.

.. image:: /images/contributing/docs-pull-request-platformsh.png
:align: center
:alt: Platform.sh Pull Request Deployment

To access the `Platform.sh`_ environment URL, simply go to your Pull Request
page on GitHub and click on ``Details``.

.. note::

The specific configuration files at the root of the Git repository:
``.platform.app.yaml``, ``.platform/services.yaml`` and
``.platform/routes.yaml`` allow `Platform.sh`_ to build Pull Requests.

Minor Changes (e.g. Typos)
--------------------------

Expand Down Expand Up @@ -324,3 +345,4 @@ definitely don't want you to waste your time!
.. _SensioLabsConnect: https://connect.sensiolabs.com/
.. _`Symfony Documentation Badge`: https://connect.sensiolabs.com/badge/36/symfony-documentation-contributor
.. _`sync your fork`: https://help.github.com/articles/syncing-a-fork
.. _`Platform.sh`: https://platform.sh
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.