diff --git a/doc/usage.ipynb b/doc/usage.ipynb index 778b2127..6d99ef7c 100644 --- a/doc/usage.ipynb +++ b/doc/usage.ipynb @@ -692,6 +692,37 @@ "" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Automatic Creation of HTML and PDF output on GitLab Pages\n", + "\n", + "When using GitLab pages, you can use nbsphinx by adding the file `.gitlab-ci.yml` to your repo and copy the following code into this file:\n", + "```\n", + "image: python\n", + "\n", + "before_script:\n", + " - apt-get update -y\n", + " - apt-get install -y pandoc\n", + "\n", + "\n", + "pages:\n", + " stage: deploy\n", + " script:\n", + " - pip install numpy ipykernel\n", + " - pip install sphinx nbsphinx \n", + " - mkdir -p doc; cd doc\n", + " - sphinx-build -b html source ../public/\n", + " - echo 'Done'\n", + " artifacts:\n", + " paths:\n", + " - public\n", + " only:\n", + " - master\n", + "```" + ] + }, { "cell_type": "markdown", "metadata": {},