Last active
April 28, 2024 08:36
-
-
Save Himura2la/dc054311c96d2737f11dbef6880b61b8 to your computer and use it in GitHub Desktop.
MkDocs with plugins in GitLab CI (with apk and pip packages caching)
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:alpine | |
variables: | |
PIP_CACHE_DIR: $CI_PROJECT_DIR/.cache/pip | |
APK_CACHE_DIR: $CI_PROJECT_DIR/.cache/apk | |
PIP_PACKAGES: | |
mkdocs | |
mkdocs-material | |
mkdocs-git-revision-date-localized-plugin | |
cache: | |
paths: | |
- $PIP_CACHE_DIR | |
- $APK_CACHE_DIR | |
update_mkdocs: | |
only: [ schedules ] | |
script: | |
- apk update | |
- apk add --no-cache gcc musl-dev | |
- pip install --upgrade $PIP_PACKAGES | |
- mkdir -p $APK_CACHE_DIR | |
- apk add --cache-dir $APK_CACHE_DIR git | |
pages: | |
only: [ master ] | |
except: [ schedules ] | |
before_script: | |
- apk update --cache-dir $APK_CACHE_DIR | |
- apk add --cache-dir $APK_CACHE_DIR git | |
- pip install $PIP_PACKAGES | |
script: | |
- mkdocs build -d public | |
artifacts: | |
paths: | |
- public |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment