Last active
August 27, 2021 12:06
-
-
Save lnnrtwttkhn/613b97b754b9669e723570f32798f0ba to your computer and use it in GitHub Desktop.
.gitlab-ci.yml file for deploying mkdocs + Material theme to GitLab pages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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