├── .gitignore ├── netlify.toml ├── source ├── robots.txt ├── _static │ ├── favicon.ico │ ├── pr-build-fail.png │ └── custom.css ├── sitemapindex.xml ├── index.rst ├── continuous-deployment.rst ├── continuous-integration.rst └── conf.py ├── requirements.txt ├── l10n ├── locales │ ├── de │ │ └── LC_MESSAGES │ │ │ ├── index.mo │ │ │ ├── continuous-deployment.mo │ │ │ ├── continuous-integration.mo │ │ │ ├── index.po │ │ │ ├── continuous-deployment.po │ │ │ └── continuous-integration.po │ └── en │ │ └── LC_MESSAGES │ │ ├── index.mo │ │ ├── continuous-deployment.mo │ │ ├── continuous-integration.mo │ │ ├── index.po │ │ ├── continuous-deployment.po │ │ └── continuous-integration.po └── templates │ ├── .doctrees │ ├── index.doctree │ ├── environment.pickle │ ├── continuous-deployment.doctree │ └── continuous-integration.doctree │ ├── index.pot │ ├── continuous-deployment.pot │ └── continuous-integration.pot ├── .travis.yml ├── Makefile ├── .github └── FUNDING.yml ├── _templates ├── versions.html ├── footer.html └── breadcrumbs.html ├── README.md ├── LICENSE └── restore.sh /.gitignore: -------------------------------------------------------------------------------- 1 | _build 2 | build 3 | .venv 4 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | publish = "build" 3 | command = "make html" 4 | -------------------------------------------------------------------------------- /source/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | 3 | Sitemap: https://continuous-sphinx.netlify.com/sitemapindex.xml -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx 2 | sphinx-sitemap 3 | sphinx-gitstamp 4 | sphinx-notfound-page 5 | sphinx-rtd-theme 6 | -------------------------------------------------------------------------------- /source/_static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdillard/continuous-sphinx/HEAD/source/_static/favicon.ico -------------------------------------------------------------------------------- /source/_static/pr-build-fail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdillard/continuous-sphinx/HEAD/source/_static/pr-build-fail.png -------------------------------------------------------------------------------- /l10n/locales/de/LC_MESSAGES/index.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdillard/continuous-sphinx/HEAD/l10n/locales/de/LC_MESSAGES/index.mo -------------------------------------------------------------------------------- /l10n/locales/en/LC_MESSAGES/index.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdillard/continuous-sphinx/HEAD/l10n/locales/en/LC_MESSAGES/index.mo -------------------------------------------------------------------------------- /l10n/templates/.doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdillard/continuous-sphinx/HEAD/l10n/templates/.doctrees/index.doctree -------------------------------------------------------------------------------- /l10n/templates/.doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdillard/continuous-sphinx/HEAD/l10n/templates/.doctrees/environment.pickle -------------------------------------------------------------------------------- /l10n/locales/de/LC_MESSAGES/continuous-deployment.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdillard/continuous-sphinx/HEAD/l10n/locales/de/LC_MESSAGES/continuous-deployment.mo -------------------------------------------------------------------------------- /l10n/locales/de/LC_MESSAGES/continuous-integration.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdillard/continuous-sphinx/HEAD/l10n/locales/de/LC_MESSAGES/continuous-integration.mo -------------------------------------------------------------------------------- /l10n/locales/en/LC_MESSAGES/continuous-deployment.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdillard/continuous-sphinx/HEAD/l10n/locales/en/LC_MESSAGES/continuous-deployment.mo -------------------------------------------------------------------------------- /l10n/locales/en/LC_MESSAGES/continuous-integration.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdillard/continuous-sphinx/HEAD/l10n/locales/en/LC_MESSAGES/continuous-integration.mo -------------------------------------------------------------------------------- /l10n/templates/.doctrees/continuous-deployment.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdillard/continuous-sphinx/HEAD/l10n/templates/.doctrees/continuous-deployment.doctree -------------------------------------------------------------------------------- /l10n/templates/.doctrees/continuous-integration.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdillard/continuous-sphinx/HEAD/l10n/templates/.doctrees/continuous-integration.doctree -------------------------------------------------------------------------------- /source/_static/custom.css: -------------------------------------------------------------------------------- 1 | /* fix padding on upper-right buttons */ 2 | .wy-breadcrumbs li a:first-child { 3 | padding-left: 5px; 4 | } 5 | 6 | .wy-breadcrumbs li a { 7 | display: inline-block; 8 | padding: 5px; 9 | } 10 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | - "3.7" 4 | 5 | sudo: false 6 | cache: pip 7 | 8 | install: pip install -r requirements.txt 9 | script: sphinx-build -nWT -b dummy source build 10 | 11 | after_failure: 12 | - chmod +x ./restore.sh 13 | - ./restore.sh 14 | -------------------------------------------------------------------------------- /source/sitemapindex.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | https://continuous-sphinx.netlify.com/en/latest/sitemap.xml 5 | 6 | 7 | https://continuous-sphinx.netlify.com/de/latest/sitemap.xml 8 | 9 | 10 | -------------------------------------------------------------------------------- /source/index.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | Continuous Sphinx 3 | ================= 4 | 5 | A living example of a sphinx project that uses `Travis-CI`_ for continuous 6 | integration and `Netlify`_ for continuous deployment. 7 | 8 | .. toctree:: 9 | :maxdepth: 2 10 | 11 | continuous-integration 12 | continuous-deployment 13 | 14 | .. _Travis-CI: https://travis-ci.org/ 15 | .. _Netlify: https://www.netlify.com/ 16 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest 5 | 6 | help: 7 | @echo "Please use \`make ' where is one of" 8 | @echo " html to make standalone HTML files" 9 | 10 | html: 11 | sphinx-build -E source build/en/latest 12 | sphinx-build -E -D language='de' source build/de/latest 13 | mv build/en/latest/sitemapindex.xml build 14 | mv build/en/latest/robots.txt build 15 | @echo 16 | @echo "Build finished. The HTML pages are in build." 17 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: jareddillard 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /_templates/versions.html: -------------------------------------------------------------------------------- 1 | {# Add rst-badge after rst-versions for small badge style. #} 2 |
3 | 4 | Additional Resources 5 | v: {{ current_version }} 6 | 7 | 8 |
9 |
10 |
{{ _('Versions') }}
11 | {% for slug, url in versions %} 12 |
{{ slug }}
13 | {% endfor %} 14 |
15 |
16 |
{{ _('Languages') }}
17 | {% for slug, url in languages %} 18 |
{{ slug }}
19 | {% endfor %} 20 |
21 |
22 |
23 | -------------------------------------------------------------------------------- /l10n/templates/index.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) 2018, jdillard 3 | # This file is distributed under the same license as the Continuous Sphinx package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: Continuous Sphinx 1.0.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2018-06-15 23:27-0500\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #: ../../source/index.rst:3 20 | msgid "Continuous Sphinx" 21 | msgstr "" 22 | 23 | #: ../../source/index.rst:5 24 | msgid "A living example of a sphinx project that uses `Travis-CI`_ for continuous integration and `Netlify`_ for continuous deployment." 25 | msgstr "" 26 | 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # continuous-sphinx 2 | 3 | [![Build Status](https://travis-ci.org/jdillard/continuous-sphinx.svg?branch=master)](https://travis-ci.org/jdillard/continuous-sphinx) 4 | 5 | An example of continuous integration, using [Travis-CI](https://travis-ci.org/), 6 | and deployment, using [Netlify](https://www.netlify.com/), of a 7 | [sphinx](http://www.sphinx-doc.org/) project. This is also reffered to as **Docs as Code** and **DocOps**. 8 | 9 | The production version of the deployed site, as well as additional documentation 10 | on the process, can be viewed here: https://continuous-sphinx.netlify.com/en/latest/ 11 | 12 | ## Installing Locally 13 | 14 | 1. Set up a [python virtual environment](https://packaging.python.org/guides/installing-using-pip-and-virtualenv/) 15 | named `venv`. 16 | 2. Activate the `venv` environment. 17 | 3. Install the dependencies inside of it by running `pip install -r 18 | requirements.txt`. 19 | 4. Run `make html`. 20 | -------------------------------------------------------------------------------- /l10n/locales/en/LC_MESSAGES/index.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) 2018, jdillard 3 | # This file is distributed under the same license as the Continuous Sphinx 4 | # package. 5 | # FIRST AUTHOR , 2018. 6 | # 7 | #, fuzzy 8 | msgid "" 9 | msgstr "" 10 | "Project-Id-Version: Continuous Sphinx 1.0.0\n" 11 | "Report-Msgid-Bugs-To: \n" 12 | "POT-Creation-Date: 2018-06-15 23:27-0500\n" 13 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 | "Last-Translator: FULL NAME \n" 15 | "Language-Team: LANGUAGE \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=utf-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Generated-By: Babel 2.5.3\n" 20 | 21 | #: ../../source/index.rst:3 22 | msgid "Continuous Sphinx" 23 | msgstr "" 24 | 25 | #: ../../source/index.rst:5 26 | msgid "" 27 | "A living example of a sphinx project that uses `Travis-CI`_ for " 28 | "continuous integration and `Netlify`_ for continuous deployment." 29 | msgstr "" 30 | 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Jared Dillard 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /l10n/locales/de/LC_MESSAGES/index.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) 2018, jdillard 3 | # This file is distributed under the same license as the Continuous Sphinx 4 | # package. 5 | # FIRST AUTHOR , 2018. 6 | # 7 | #, fuzzy 8 | msgid "" 9 | msgstr "" 10 | "Project-Id-Version: Continuous Sphinx 1.0.0\n" 11 | "Report-Msgid-Bugs-To: \n" 12 | "POT-Creation-Date: 2018-06-15 23:27-0500\n" 13 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 | "Last-Translator: FULL NAME \n" 15 | "Language-Team: LANGUAGE \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=utf-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Generated-By: Babel 2.5.3\n" 20 | 21 | #: ../../source/index.rst:3 22 | msgid "Continuous Sphinx" 23 | msgstr "Kontinuierliche Sphinx" 24 | 25 | #: ../../source/index.rst:5 26 | msgid "" 27 | "A living example of a sphinx project that uses `Travis-CI`_ for " 28 | "continuous integration and `Netlify`_ for continuous deployment." 29 | msgstr "" 30 | "Ein lebendes Beispiel für ein Sphinx Projekt, das `Travis-CI`_ für " 31 | "kontinuierliche Integration und `Netlify`_ für kontinuierliche Bereitstellung verwendet." 32 | 33 | -------------------------------------------------------------------------------- /_templates/footer.html: -------------------------------------------------------------------------------- 1 | {% extends "!footer.html" %} 2 | {% block contentinfo %} 3 |

4 | {%- if show_copyright %} 5 | {%- if hasdoc('copyright') %} 6 | {% trans path=pathto('copyright'), copyright=copyright|e %}© Copyright {{ copyright }}{% endtrans %} 7 | {%- else %} 8 | {% trans copyright=copyright|e %}© Copyright {{ copyright }}{% endtrans %} 9 | {%- endif %} 10 | {%- endif %} 11 | 12 | {%- if build_id and build_url %} 13 | {% trans build_url=build_url, build_id=build_id %} 14 | 15 | Build 16 | {{ build_id }}. 17 | 18 | {% endtrans %} 19 | {%- elif commit %} 20 | {% trans commit=commit %} 21 | 22 | Revision {{ commit }}. 23 | 24 | {% endtrans %} 25 | {%- elif last_updated %} 26 | 27 | {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %} 28 | 29 | {%- endif %} 30 | {%- if gitstamp %}

This page was last updated on {{ gitstamp }}.

{%- endif %} 31 |

32 | {% endblock %} 33 | -------------------------------------------------------------------------------- /restore.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # die on error 4 | set -e 5 | 6 | # https://developer.travis-ci.org/resource/builds#Builds 7 | echo 'Retrieving last successful Travis-CI build...' 8 | for row in $(curl -H "Travis-API-Version: 3" -H "User-Agent: API Explorer" -H "Authorization: token $TRAVISCI_API_KEY" https://api.travis-ci.org/builds?limit=10 | jq -r '.builds[] | @base64'); do 9 | _jq() { 10 | echo ${row} | base64 --decode | jq -r ${1} 11 | } 12 | 13 | if [ $(_jq '.state') == "passed" ]; then 14 | good_build=$(_jq '.commit.sha') 15 | break 16 | fi 17 | done 18 | 19 | # https://www.netlify.com/docs/api/#deploys 20 | echo "Retrieving Netlify deploy for Travis-CI build ${good_build}..." 21 | for row in $(curl -H "Authorization: Bearer $NETLIFY_PUBLISH_KEY" https://api.netlify.com/api/v1/sites/continuous-sphinx.netlify.com/deploys | jq -r '.[] | @base64'); do 22 | _jq() { 23 | echo ${row} | base64 --decode | jq -r ${1} 24 | } 25 | 26 | deploy_commit=$(_jq '.commit_ref') 27 | 28 | if [ "$deploy_commit" == "$good_build" ]; then 29 | good_deploy=$(_jq '.id') 30 | fi 31 | done 32 | 33 | # https://www.netlify.com/docs/api/#deploys 34 | echo "Publishing Netlify build ${good_deploy}..." 35 | curl -X POST -H "Authorization: Bearer $NETLIFY_PUBLISH_KEY" -d "{}" "https://api.netlify.com/api/v1/sites/continuous-sphinx.netlify.com/deploys/${good_deploy}/restore" 36 | -------------------------------------------------------------------------------- /source/continuous-deployment.rst: -------------------------------------------------------------------------------- 1 | Continuous Deployment using Netlify 2 | =================================== 3 | 4 | `Netlify`_ allows you to trigger a build, and more importantly a deployment, of 5 | a sphinx project based on `GitHub commits`_ and `pull requests`_. Thus creating the 6 | continuous deployment portion of the pipeline. 7 | 8 | Using `PR #3`_ as an example, you can see it has a **Details** link to the 9 | `latest netlify build specific to that PR`_. 10 | 11 | .. figure:: _static/pr-build-fail.png 12 | :figclass: align-center 13 | 14 | This is a PR that caused a failed build. 15 | 16 | Although, since unfortunately we can't trigger a Netlify build based on a 17 | `Travis-CI`_ build status we have to add a `custom script`_ to the `Travis-CI 18 | configuration`_. Since we only want to deploy the site if the project passes the 19 | continuous integration process we need to use `Netlify's restore deploy 20 | feature`_ on build failures. 21 | 22 | .. note:: It is possible for their to be a brief window where the failed 23 | `Netlify`_ build is published before the restore deploy call is run. 24 | 25 | .. _custom script: https://github.com/jdillard/continuous-sphinx/blob/master/restore.sh 26 | .. _GitHub commits: https://github.com/jdillard/continuous-sphinx/commits/master 27 | .. _latest netlify build specific to that PR: https://deploy-preview-3--continuous-sphinx.netlify.com/ 28 | .. _Netlify: https://www.netlify.com/ 29 | .. _Netlify's restore deploy feature: https://www.netlify.com/docs/api/#deploys 30 | .. _PR #3: https://github.com/jdillard/continuous-sphinx/pull/3 31 | .. _pull requests: https://github.com/jdillard/continuous-sphinx/pulls 32 | .. _Travis-CI: https://travis-ci.org/ 33 | .. _Travis-CI configuration: https://github.com/jdillard/continuous-sphinx/blob/master/.travis.yml 34 | -------------------------------------------------------------------------------- /source/continuous-integration.rst: -------------------------------------------------------------------------------- 1 | Continuous Integration using Travis-CI 2 | ====================================== 3 | 4 | Continuous Integration is basically integrating your newest addition of code, or 5 | markup language, into the larger project and running a series of tests to make 6 | sure it behaves as expected. In the case of a sphinx project, the most important 7 | test is to lint the submitted reStructuredText to make sure it has correct 8 | syntax. 9 | 10 | For linting purposes, the ``sphinx-build`` command allows you to specify a 11 | `dummy builder`_ that does syntax checks, but doesn't write output. 12 | 13 | You can also use ``-n`` to run the builder in "nit-picky mode", which warns 14 | about all missing references, combined with ``-W`` to turn all warnings into 15 | errors. And finally, ``-T`` to show full traceback on exception to help debug 16 | failed build logs. 17 | 18 | Not only can you configure `Travis-CI`_ to run on the `master branch`_, but it 19 | also supports running integration tests on `all pull requests`_ before they are 20 | to be merged. 21 | 22 | Travis-CI also integrates with GitHub so you can see the build status on each 23 | commit or PR and wether or not the build it triggered passed or failed. 24 | 25 | Using `PR #3`_ as an example, you can see it has a **Details** link to the 26 | `latest build for that PR`_. 27 | 28 | .. figure:: _static/pr-build-fail.png 29 | :figclass: align-center 30 | 31 | This is a PR that caused a failed build. 32 | 33 | .. _all pull requests: https://travis-ci.org/jdillard/continuous-sphinx/pull_requests 34 | .. _dummy builder: http://www.sphinx-doc.org/en/master/_modules/sphinx/builders/dummy.html 35 | .. _latest build for that PR: https://travis-ci.org/jdillard/continuous-sphinx/builds/359119935 36 | .. _master branch: https://travis-ci.org/jdillard/continuous-sphinx/branches 37 | .. _PR #3: https://github.com/jdillard/continuous-sphinx/pull/3 38 | .. _Travis-CI: https://travis-ci.org/jdillard/continuous-sphinx -------------------------------------------------------------------------------- /l10n/templates/continuous-deployment.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) 2018, jdillard 3 | # This file is distributed under the same license as the Continuous Sphinx package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: Continuous Sphinx 1.0.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2018-06-15 23:27-0500\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #: ../../source/continuous-deployment.rst:2 20 | msgid "Continuous Deployment using Netlify" 21 | msgstr "" 22 | 23 | #: ../../source/continuous-deployment.rst:4 24 | msgid "`Netlify`_ allows you to trigger a build, and more importantly a deployment, of a sphinx project based on `GitHub commits`_ and `pull requests`_. Thus creating the continuous deployment portion of the pipeline." 25 | msgstr "" 26 | 27 | #: ../../source/continuous-deployment.rst:8 28 | msgid "Using `PR #3`_ as an example, you can see it has a **Details** link to the `latest netlify build specific to that PR`_." 29 | msgstr "" 30 | 31 | #: ../../source/continuous-deployment.rst:14 32 | msgid "This is a PR that caused a failed build." 33 | msgstr "" 34 | 35 | #: ../../source/continuous-deployment.rst:16 36 | msgid "Although, since unfortunately we can't trigger a Netlify build based on a `Travis-CI`_ build status we have to add a `custom script`_ to the `Travis-CI configuration`_. Since we only want to deploy the site if the project passes the continuous integration process we need to use `Netlify's restore deploy feature`_ on build failures." 37 | msgstr "" 38 | 39 | #: ../../source/continuous-deployment.rst:22 40 | msgid "It is possible for their to be a brief window where the failed `Netlify`_ build is published before the restore deploy call is run." 41 | msgstr "" 42 | 43 | -------------------------------------------------------------------------------- /l10n/locales/de/LC_MESSAGES/continuous-deployment.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) 2018, jdillard 3 | # This file is distributed under the same license as the Continuous Sphinx 4 | # package. 5 | # FIRST AUTHOR , 2018. 6 | # 7 | #, fuzzy 8 | msgid "" 9 | msgstr "" 10 | "Project-Id-Version: Continuous Sphinx 1.0.0\n" 11 | "Report-Msgid-Bugs-To: \n" 12 | "POT-Creation-Date: 2018-06-15 23:27-0500\n" 13 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 | "Last-Translator: FULL NAME \n" 15 | "Language-Team: LANGUAGE \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=utf-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Generated-By: Babel 2.5.3\n" 20 | 21 | #: ../../source/continuous-deployment.rst:2 22 | msgid "Continuous Deployment using Netlify" 23 | msgstr "" 24 | 25 | #: ../../source/continuous-deployment.rst:4 26 | msgid "" 27 | "`Netlify`_ allows you to trigger a build, and more importantly a " 28 | "deployment, of a sphinx project based on `GitHub commits`_ and `pull " 29 | "requests`_. Thus creating the continuous deployment portion of the " 30 | "pipeline." 31 | msgstr "" 32 | 33 | #: ../../source/continuous-deployment.rst:8 34 | msgid "" 35 | "Using `PR #3`_ as an example, you can see it has a **Details** link to " 36 | "the `latest netlify build specific to that PR`_." 37 | msgstr "" 38 | 39 | #: ../../source/continuous-deployment.rst:14 40 | msgid "This is a PR that caused a failed build." 41 | msgstr "" 42 | 43 | #: ../../source/continuous-deployment.rst:16 44 | msgid "" 45 | "Although, since unfortunately we can't trigger a Netlify build based on a" 46 | " `Travis-CI`_ build status we have to add a `custom script`_ to the " 47 | "`Travis-CI configuration`_. Since we only want to deploy the site if the " 48 | "project passes the continuous integration process we need to use " 49 | "`Netlify's restore deploy feature`_ on build failures." 50 | msgstr "" 51 | 52 | #: ../../source/continuous-deployment.rst:22 53 | msgid "" 54 | "It is possible for their to be a brief window where the failed `Netlify`_" 55 | " build is published before the restore deploy call is run." 56 | msgstr "" 57 | 58 | -------------------------------------------------------------------------------- /l10n/locales/en/LC_MESSAGES/continuous-deployment.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) 2018, jdillard 3 | # This file is distributed under the same license as the Continuous Sphinx 4 | # package. 5 | # FIRST AUTHOR , 2018. 6 | # 7 | #, fuzzy 8 | msgid "" 9 | msgstr "" 10 | "Project-Id-Version: Continuous Sphinx 1.0.0\n" 11 | "Report-Msgid-Bugs-To: \n" 12 | "POT-Creation-Date: 2018-06-15 23:27-0500\n" 13 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 | "Last-Translator: FULL NAME \n" 15 | "Language-Team: LANGUAGE \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=utf-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Generated-By: Babel 2.5.3\n" 20 | 21 | #: ../../source/continuous-deployment.rst:2 22 | msgid "Continuous Deployment using Netlify" 23 | msgstr "" 24 | 25 | #: ../../source/continuous-deployment.rst:4 26 | msgid "" 27 | "`Netlify`_ allows you to trigger a build, and more importantly a " 28 | "deployment, of a sphinx project based on `GitHub commits`_ and `pull " 29 | "requests`_. Thus creating the continuous deployment portion of the " 30 | "pipeline." 31 | msgstr "" 32 | 33 | #: ../../source/continuous-deployment.rst:8 34 | msgid "" 35 | "Using `PR #3`_ as an example, you can see it has a **Details** link to " 36 | "the `latest netlify build specific to that PR`_." 37 | msgstr "" 38 | 39 | #: ../../source/continuous-deployment.rst:14 40 | msgid "This is a PR that caused a failed build." 41 | msgstr "" 42 | 43 | #: ../../source/continuous-deployment.rst:16 44 | msgid "" 45 | "Although, since unfortunately we can't trigger a Netlify build based on a" 46 | " `Travis-CI`_ build status we have to add a `custom script`_ to the " 47 | "`Travis-CI configuration`_. Since we only want to deploy the site if the " 48 | "project passes the continuous integration process we need to use " 49 | "`Netlify's restore deploy feature`_ on build failures." 50 | msgstr "" 51 | 52 | #: ../../source/continuous-deployment.rst:22 53 | msgid "" 54 | "It is possible for their to be a brief window where the failed `Netlify`_" 55 | " build is published before the restore deploy call is run." 56 | msgstr "" 57 | 58 | -------------------------------------------------------------------------------- /l10n/templates/continuous-integration.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) 2018, jdillard 3 | # This file is distributed under the same license as the Continuous Sphinx package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: Continuous Sphinx 1.0.0\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2018-06-15 23:27-0500\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #: ../../source/continuous-integration.rst:2 20 | msgid "Continuous Integration using Travis-CI" 21 | msgstr "" 22 | 23 | #: ../../source/continuous-integration.rst:4 24 | msgid "Continuous Integration is basically integrating your newest addition of code, or markup language, into the larger project and running a series of tests to make sure it behaves as expected. In the case of a sphinx project, the most important test is to lint the submitted reStructuredText to make sure it has correct syntax." 25 | msgstr "" 26 | 27 | #: ../../source/continuous-integration.rst:10 28 | msgid "For linting purposes, the ``sphinx-build`` command allows you to specify a `dummy builder`_ that does syntax checks, but doesn't write output." 29 | msgstr "" 30 | 31 | #: ../../source/continuous-integration.rst:13 32 | msgid "You can also use ``-n`` to run the builder in \"nit-picky mode\", which warns about all missing references, combined with ``-W`` to turn all warnings into errors. And finally, ``-T`` to show full traceback on exception to help debug failed build logs." 33 | msgstr "" 34 | 35 | #: ../../source/continuous-integration.rst:18 36 | msgid "Not only can you configure `Travis-CI`_ to run on the `master branch`_, but it also supports running integration tests on `all pull requests`_ before they are to be merged." 37 | msgstr "" 38 | 39 | #: ../../source/continuous-integration.rst:22 40 | msgid "Travis-CI also integrates with GitHub so you can see the build status on each commit or PR and wether or not the build it triggered passed or failed." 41 | msgstr "" 42 | 43 | #: ../../source/continuous-integration.rst:25 44 | msgid "Using `PR #3`_ as an example, you can see it has a **Details** link to the `latest build for that PR`_." 45 | msgstr "" 46 | 47 | #: ../../source/continuous-integration.rst:31 48 | msgid "This is a PR that caused a failed build." 49 | msgstr "" 50 | 51 | -------------------------------------------------------------------------------- /l10n/locales/en/LC_MESSAGES/continuous-integration.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) 2018, jdillard 3 | # This file is distributed under the same license as the Continuous Sphinx 4 | # package. 5 | # FIRST AUTHOR , 2018. 6 | # 7 | #, fuzzy 8 | msgid "" 9 | msgstr "" 10 | "Project-Id-Version: Continuous Sphinx 1.0.0\n" 11 | "Report-Msgid-Bugs-To: \n" 12 | "POT-Creation-Date: 2018-06-15 23:27-0500\n" 13 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 | "Last-Translator: FULL NAME \n" 15 | "Language-Team: LANGUAGE \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=utf-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Generated-By: Babel 2.5.3\n" 20 | 21 | #: ../../source/continuous-integration.rst:2 22 | msgid "Continuous Integration using Travis-CI" 23 | msgstr "" 24 | 25 | #: ../../source/continuous-integration.rst:4 26 | msgid "" 27 | "Continuous Integration is basically integrating your newest addition of " 28 | "code, or markup language, into the larger project and running a series of" 29 | " tests to make sure it behaves as expected. In the case of a sphinx " 30 | "project, the most important test is to lint the submitted " 31 | "reStructuredText to make sure it has correct syntax." 32 | msgstr "" 33 | 34 | #: ../../source/continuous-integration.rst:10 35 | msgid "" 36 | "For linting purposes, the ``sphinx-build`` command allows you to specify " 37 | "a `dummy builder`_ that does syntax checks, but doesn't write output." 38 | msgstr "" 39 | 40 | #: ../../source/continuous-integration.rst:13 41 | msgid "" 42 | "You can also use ``-n`` to run the builder in \"nit-picky mode\", which " 43 | "warns about all missing references, combined with ``-W`` to turn all " 44 | "warnings into errors. And finally, ``-T`` to show full traceback on " 45 | "exception to help debug failed build logs." 46 | msgstr "" 47 | 48 | #: ../../source/continuous-integration.rst:18 49 | msgid "" 50 | "Not only can you configure `Travis-CI`_ to run on the `master branch`_, " 51 | "but it also supports running integration tests on `all pull requests`_ " 52 | "before they are to be merged." 53 | msgstr "" 54 | 55 | #: ../../source/continuous-integration.rst:22 56 | msgid "" 57 | "Travis-CI also integrates with GitHub so you can see the build status on " 58 | "each commit or PR and wether or not the build it triggered passed or " 59 | "failed." 60 | msgstr "" 61 | 62 | #: ../../source/continuous-integration.rst:25 63 | msgid "" 64 | "Using `PR #3`_ as an example, you can see it has a **Details** link to " 65 | "the `latest build for that PR`_." 66 | msgstr "" 67 | 68 | #: ../../source/continuous-integration.rst:31 69 | msgid "This is a PR that caused a failed build." 70 | msgstr "" 71 | 72 | -------------------------------------------------------------------------------- /l10n/locales/de/LC_MESSAGES/continuous-integration.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) 2018, jdillard 3 | # This file is distributed under the same license as the Continuous Sphinx 4 | # package. 5 | # FIRST AUTHOR , 2018. 6 | # 7 | #, fuzzy 8 | msgid "" 9 | msgstr "" 10 | "Project-Id-Version: Continuous Sphinx 1.0.0\n" 11 | "Report-Msgid-Bugs-To: \n" 12 | "POT-Creation-Date: 2018-06-15 23:27-0500\n" 13 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 | "Last-Translator: FULL NAME \n" 15 | "Language-Team: LANGUAGE \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=utf-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Generated-By: Babel 2.5.3\n" 20 | 21 | #: ../../source/continuous-integration.rst:2 22 | msgid "Continuous Integration using Travis-CI" 23 | msgstr "Kontinuierliche Integration mit Travis-CI" 24 | 25 | #: ../../source/continuous-integration.rst:4 26 | msgid "" 27 | "Continuous Integration is basically integrating your newest addition of " 28 | "code, or markup language, into the larger project and running a series of" 29 | " tests to make sure it behaves as expected. In the case of a sphinx " 30 | "project, the most important test is to lint the submitted " 31 | "reStructuredText to make sure it has correct syntax." 32 | msgstr "" 33 | 34 | #: ../../source/continuous-integration.rst:10 35 | msgid "" 36 | "For linting purposes, the ``sphinx-build`` command allows you to specify " 37 | "a `dummy builder`_ that does syntax checks, but doesn't write output." 38 | msgstr "" 39 | 40 | #: ../../source/continuous-integration.rst:13 41 | msgid "" 42 | "You can also use ``-n`` to run the builder in \"nit-picky mode\", which " 43 | "warns about all missing references, combined with ``-W`` to turn all " 44 | "warnings into errors. And finally, ``-T`` to show full traceback on " 45 | "exception to help debug failed build logs." 46 | msgstr "" 47 | 48 | #: ../../source/continuous-integration.rst:18 49 | msgid "" 50 | "Not only can you configure `Travis-CI`_ to run on the `master branch`_, " 51 | "but it also supports running integration tests on `all pull requests`_ " 52 | "before they are to be merged." 53 | msgstr "" 54 | 55 | #: ../../source/continuous-integration.rst:22 56 | msgid "" 57 | "Travis-CI also integrates with GitHub so you can see the build status on " 58 | "each commit or PR and wether or not the build it triggered passed or " 59 | "failed." 60 | msgstr "" 61 | 62 | #: ../../source/continuous-integration.rst:25 63 | msgid "" 64 | "Using `PR #3`_ as an example, you can see it has a **Details** link to " 65 | "the `latest build for that PR`_." 66 | msgstr "" 67 | "Mit `PR #3`_ als Beispiel sehen Sie, dass es einen **Details** link zu " 68 | "der `neueste Build für diesen PR`_" 69 | 70 | #: ../../source/continuous-integration.rst:31 71 | msgid "This is a PR that caused a failed build." 72 | msgstr "Dies ist eine PR, die einen fehlgeschlagenen Build verursacht hat." 73 | 74 | -------------------------------------------------------------------------------- /_templates/breadcrumbs.html: -------------------------------------------------------------------------------- 1 | {% extends "!breadcrumbs.html" %} 2 | {% block breadcrumbs_aside %} 3 |
  • 4 | {% if hasdoc(pagename) %} 5 | {% if display_github %} 6 | {% if check_meta and 'github_url' in meta %} 7 | 8 | {{ _('Edit on GitHub') }} 9 | {% else %} 10 | 11 | 12 | 13 | {% endif %} 14 | {% elif display_bitbucket %} 15 | {% if check_meta and 'bitbucket_url' in meta %} 16 | 17 | {{ _('Edit on Bitbucket') }} 18 | {% else %} 19 | {{ _('Edit on Bitbucket') }} 20 | {% endif %} 21 | {% elif display_gitlab %} 22 | {% if check_meta and 'gitlab_url' in meta %} 23 | 24 | {{ _('Edit on GitLab') }} 25 | {% else %} 26 | {{ _('Edit on GitLab') }} 27 | {% endif %} 28 | {% elif show_source and source_url_prefix %} 29 | {{ _('View page source') }} 30 | {% elif show_source and has_source and sourcename %} 31 | {{ _('View page source') }} 32 | {% endif %} 33 | {% endif %} 34 |
  • 35 | {% endblock %} 36 | 37 | -------------------------------------------------------------------------------- /source/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # This file is execfile()d with the current directory set to its 4 | # containing dir. 5 | # 6 | # Note that not all possible configuration values are present. All configuration 7 | # values have a default. 8 | 9 | import sys 10 | import os 11 | import shlex 12 | 13 | # Redefine supported_image_types for the HTML builder 14 | from sphinx.builders.html import StandaloneHTMLBuilder 15 | StandaloneHTMLBuilder.supported_image_types = [ 16 | 'image/gif', 17 | 'image/png', 18 | 'image/jpeg', 19 | 'image/svg+xml', 20 | ] 21 | 22 | # If extensions (or modules to document with autodoc) are in another directory, 23 | # add these directories to sys.path here. If the directory is relative to the 24 | # documentation root, use os.path.abspath to make it absolute, like shown here. 25 | sys.path.insert(0, os.path.abspath('.')) 26 | 27 | # -- General configuration ------------------------------------------------ 28 | 29 | html_baseurl = 'https://continuous-sphinx.netlify.com/' 30 | 31 | # Absolute path of conf.py 32 | conf_abs_path = os.path.abspath(__file__) 33 | 34 | # Add any Sphinx extension module names here, as strings. They can be 35 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 36 | # ones. 37 | extensions = [ 38 | 'sphinx_sitemap', 39 | 'sphinx_gitstamp', 40 | 'notfound.extension' 41 | ] 42 | 43 | # Add any paths that contain templates here, relative to this directory. 44 | templates_path = ['../_templates'] 45 | 46 | # The suffix(es) of source filenames. 47 | # You can specify multiple suffix as a list of string: 48 | # source_suffix = ['.rst', '.md'] 49 | source_suffix = '.rst' 50 | 51 | # The master toctree document. 52 | master_doc = 'index' 53 | 54 | # General information about the project. 55 | project = 'Continuous Sphinx' 56 | copyright = '2018, Jared Dillard' 57 | author = 'jdillard' 58 | 59 | # The version info for the project you're documenting, acts as replacement for 60 | # |version| and |release|, also used in various other places throughout the 61 | # built documents. 62 | # 63 | # The short X.Y version. 64 | version = 'latest' 65 | # The full version, including alpha/beta/rc tags. 66 | release = 'latest' 67 | 68 | # The language for content autogenerated by Sphinx. Refer to documentation 69 | # for a list of supported languages. 70 | # 71 | # This is also used if you do content translation via gettext catalogs. 72 | # Usually you set "language" from the command line for these cases. 73 | language = 'en' 74 | 75 | locale_dirs = ['../l10n/locales/'] 76 | 77 | # List of patterns, relative to source directory, that match files and 78 | # directories to ignore when looking for source files. 79 | exclude_patterns = [] 80 | 81 | # The name of the Pygments (syntax highlighting) style to use. 82 | pygments_style = 'sphinx' 83 | 84 | # If true, `todo` and `todoList` produce output, else they produce nothing. 85 | todo_include_todos = False 86 | 87 | # Omit any prefix values from the static 404 URLs 88 | notfound_no_urls_prefix = True 89 | 90 | html_css_files = ['custom.css'] 91 | 92 | 93 | # -- Options for HTML output ---------------------------------------------- 94 | 95 | # The theme to use for HTML and HTML Help pages. See the documentation for 96 | # a list of builtin themes. 97 | html_theme = 'sphinx_rtd_theme' 98 | 99 | # Add any paths that contain custom themes here, relative to this directory. 100 | # html_theme_path = ["../_themes", ] 101 | 102 | html_context = { 103 | 'display_github': True, 104 | 'github_user': 'jdillard', 105 | 'github_repo': 'continuous-sphinx', 106 | 'github_version': 'master/source/', 107 | 'versions': [ 108 | ("latest", "/en/latest") 109 | ], 110 | 'languages': [ 111 | ("en", "/en/latest"), 112 | ("de", "/de/latest"), 113 | ], 114 | 'current_version': version 115 | } 116 | 117 | # The name of an image file (within the static path) to use as favicon of the 118 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 119 | # pixels large. 120 | html_favicon = '_static/favicon.ico' 121 | 122 | # Add any paths that contain custom static files (such as style sheets) here, 123 | # relative to this directory. They are copied after the builtin static files, 124 | # so a file named "default.css" will overwrite the builtin "default.css". 125 | html_static_path = ['_static'] 126 | 127 | # Add any extra paths that contain custom files (such as robots.txt or 128 | # .htaccess) here, relative to this directory. These files are copied 129 | # directly to the root of the documentation. 130 | html_extra_path = ['robots.txt', 'sitemapindex.xml'] 131 | 132 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 133 | # using the given strftime format. 134 | #html_last_updated_fmt = '' 135 | 136 | # Date format for git timestamps 137 | gitstamp_fmt = "%b %d %Y" 138 | 139 | # If true, links to the reST sources are added to the pages. 140 | html_show_sourcelink = False 141 | 142 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 143 | html_show_copyright = True 144 | 145 | # reST sources are included in the HTML build as _sources 146 | html_copy_source = False 147 | 148 | # -- Options for HTMLHelp output --------------------------------------------- 149 | 150 | # Language to be used for generating the HTML full-text search index. 151 | # Output file base name for HTML help builder. 152 | htmlhelp_basename = 'ContinuousSphinxDoc' 153 | 154 | # -- Options for LaTeX output --------------------------------------------- 155 | 156 | latex_elements = { 157 | # The paper size ('letterpaper' or 'a4paper'). 158 | #'papersize': 'letterpaper', 159 | 160 | # The font size ('10pt', '11pt' or '12pt'). 161 | #'pointsize': '10pt', 162 | 163 | # Additional stuff for the LaTeX preamble. 164 | #'preamble': '', 165 | 166 | # Latex figure (float) alignment 167 | #'figure_align': 'htbp', 168 | } 169 | 170 | # Grouping the document tree into LaTeX files. List of tuples 171 | # (source start file, target name, title, 172 | # author, documentclass [howto, manual, or own class]). 173 | latex_documents = [ 174 | (master_doc, 'ContinuousSphinx.tex', 'Continuous Sphinx Documentation', 175 | 'jdillard', 'manual'), 176 | ] 177 | --------------------------------------------------------------------------------