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

Added Installation guide for Gitlab Pages #597

Merged
merged 7 commits into from
Jan 9, 2022
Merged
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
45 changes: 45 additions & 0 deletions doc/usage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,51 @@
"</div>"
]
},
{
"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 copying the following lines into this file:\n",
"```\n",
"image: python:3-slim\n",
"\n",
"variables:\n",
" PIP: python3 -m pip\n",
" SPHINX: python3 -m sphinx -W --keep-going --color\n",
"\n",
"build-docs:\n",
" stage: build\n",
" script:\n",
" - apt-get update -y\n",
" - apt-get install -y --no-install-recommends pandoc\n",
" - $PIP install -r doc/requirements.txt\n",
" - $SPHINX -d doctrees doc html -b html\n",
" - $SPHINX -d doctrees doc linkcheck -b linkcheck\n",
" artifacts:\n",
" when: always\n",
" paths:\n",
" - html\n",
" - linkcheck/output.*\n",
" \n",
"pages:\n",
" stage: deploy\n",
" variables:\n",
" GIT_STRATEGY: none\n",
" script:\n",
" - mv html public\n",
" artifacts:\n",
" paths:\n",
" - public\n",
" rules:\n",
" - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH\n",
"```\n",
"Note: \n",
"\n",
"You migh have to change the line `docs/` to `docs/source` in case that you have this folder structure, which is the default when using `sphinx-quickstart. "
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down