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

Move wipe button to version detail page #3417

Merged
merged 7 commits into from
Dec 21, 2017
Merged
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
2 changes: 1 addition & 1 deletion docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ following settings::
Deleting a stale or broken build environment
--------------------------------------------

If you're having trouble getting your version to build, try wiping out the existing build/environment files. On your version list page ``/projects/[project]/versions`` there is a "Wipe" button that will remove all of the files associated with your documentation build, but not the documentation itself.
See :doc:`guides/wipe-environment`.

How do I host multiple projects on one CNAME?
---------------------------------------------
Expand Down
28 changes: 28 additions & 0 deletions docs/guides/wipe-environment.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Wiping a Build Environment
==========================

Sometimes it happen that your Builds start failing because the build
environment where the documentation is created is stale or
broken. This could happen for a couple of different reasons like `pip`
not upgrading a package properly or a corrupted cached Python package.

In any of these cases (and many others), the solution could be just
wiping out the existing build environment files and allow Read the
Docs to create a new fresh one.

Follow these steps to wipe the build environment:

* Go to **Versions**
* Click on the **Edit** button of the version you want to wipe on the
right side of the page
* Go to the bottom of the page and click the **wipe** link, next to
the "Save" button

.. note::

By wiping the documentation build environment, all the `rst`, `md`,
and code files associated with it will be removed but not the
documentation already built (`HTML` and `PDF` files). Your
documentation will still online after wiping the build environment.

Now you can re-build the version with a fresh build environment!
10 changes: 7 additions & 3 deletions readthedocs/templates/projects/project_version_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@
{% block content %}
<h2> Editing {{ version.slug }} </h2>
<form method="post" action=".">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Save">
{% csrf_token %}
{{ form.as_p }}
<p>
<input style="display: inline;" type="submit" value="{% trans "Save" %}">
{% trans "or" %}
<a href="{% url "wipe_version" version.project.slug version.slug %}">{% trans "wipe "%}</a>
</p>
</form>
{% endblock %}
2 changes: 0 additions & 2 deletions readthedocs/templates/projects/project_version_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ <h1>{% trans "Active Versions" %}</h1>

{% if request.user|is_admin:project %}
<ul class="module-item-menu">
<li><a href="{% url "wipe_version" project.slug version.slug %}">{% trans "Wipe" %}</a></li>
<li><a href="{% url "project_version_detail" project.slug version.slug %}">{% trans "Edit" %}</a></li>
</ul>
{% else %}
Expand Down Expand Up @@ -95,7 +94,6 @@ <h1>{% trans "Inactive Versions" %}</h1>
{% if version.built %}
<li><a href="{% url "project_version_delete_html" project.slug version.slug %}">{% trans "Clean" %}</a></li>
{% endif %}
<li><a href="{% url "wipe_version" project.slug version.slug %}">{% trans "Wipe" %}</a></li>
<li><a href="{% url "project_version_detail" project.slug version.slug %}">{% trans "Edit" %}</a></li>
</ul>
{% endif %}
Expand Down