mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-28 16:52:37 -04:00
Documentation (#8058)
* docs(publish your site): Add caching for gitlab pipeline * docs(publish your site): Add comments
This commit is contained in:
@@ -181,13 +181,21 @@ contents:
|
||||
script:
|
||||
- pip install mkdocs-material
|
||||
- mkdocs build --site-dir public
|
||||
cache:
|
||||
key: ${CI_COMMIT_REF_SLUG}
|
||||
paths:
|
||||
- .cache/ # (1)!
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
||||
|
||||
```
|
||||
|
||||
1. Some Material for MkDocs plugins use [caching] to speed up repeated
|
||||
builds, and store the results in the `.cache` directory.
|
||||
|
||||
=== "Insiders"
|
||||
|
||||
``` yaml
|
||||
@@ -197,6 +205,10 @@ contents:
|
||||
script: # (1)!
|
||||
- pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
|
||||
- mkdocs build --site-dir public
|
||||
cache:
|
||||
key: ${CI_COMMIT_REF_SLUG}
|
||||
paths:
|
||||
- .cache/ # (2)!
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
@@ -208,6 +220,9 @@ contents:
|
||||
[personal access token] when deploying [Insiders], which can be done
|
||||
using [masked custom variables].
|
||||
|
||||
2. Some Material for MkDocs plugins use [caching] to speed up repeated
|
||||
builds, and store the results in the `.cache` directory.
|
||||
|
||||
Now, when a new commit is pushed to the [default branch] (typically `master` or
|
||||
`main`), the static site is automatically built and deployed. Commit and push
|
||||
the file to your repository to see the workflow in action.
|
||||
|
||||
Reference in New Issue
Block a user