Skip to content

Instantly share code, notes, and snippets.

@lnnrtwttkhn
Last active August 27, 2021 12:06
Show Gist options
  • Select an option

  • Save lnnrtwttkhn/613b97b754b9669e723570f32798f0ba to your computer and use it in GitHub Desktop.

Select an option

Save lnnrtwttkhn/613b97b754b9669e723570f32798f0ba to your computer and use it in GitHub Desktop.
.gitlab-ci.yml file for deploying mkdocs + Material theme to GitLab pages
image: python:3 # use a Docker container with Python 3
before_script: # commands that should run before each job
# here, we install all the packages needed for mkdocs, using pip
- pip install mkdocs
- pip install mkdocs-material
- pip install pygments
- pip install pymdown-extensions
pages: # gitlab pages allows to publish static websites
stage: deploy # tells gitlab to deploy the website
script: # commands that are executed inside the container:
- mkdocs build # mkdocs command to build the website
- mv site public # move the contents of the website to public
artifacts:
paths:
- public # keep the contents of public available for download
only:
- master # only do this when new changes are pushed to the master branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment