mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Updated GitLab publishing guide (#3393)
Default branch for GitLab is main and no more master
This commit is contained in:
parent
e1cf04345c
commit
8169e7f7c8
@ -126,8 +126,9 @@ contents:
|
|||||||
image: python:latest
|
image: python:latest
|
||||||
pages:
|
pages:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
only:
|
only: # (1)!
|
||||||
- master
|
- master
|
||||||
|
- main
|
||||||
script:
|
script:
|
||||||
- pip install mkdocs-material
|
- pip install mkdocs-material
|
||||||
- mkdocs build --site-dir public
|
- mkdocs build --site-dir public
|
||||||
@ -136,15 +137,19 @@ contents:
|
|||||||
- public
|
- public
|
||||||
```
|
```
|
||||||
|
|
||||||
|
1. At some point, GitLab renamed `master` to `main`. If your default branch
|
||||||
|
is named `master`, you can safely remove `main`, vice versa.
|
||||||
|
|
||||||
=== "Insiders"
|
=== "Insiders"
|
||||||
|
|
||||||
``` yaml
|
``` yaml
|
||||||
image: python:latest
|
image: python:latest
|
||||||
pages:
|
pages:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
only:
|
only: # (1)!
|
||||||
- master
|
- master
|
||||||
script: # (1)!
|
- main
|
||||||
|
script: # (2)!
|
||||||
- pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
|
- pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
|
||||||
- mkdocs build --site-dir public
|
- mkdocs build --site-dir public
|
||||||
artifacts:
|
artifacts:
|
||||||
@ -152,7 +157,10 @@ contents:
|
|||||||
- public
|
- public
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Remember to set the `GH_TOKEN` environment variable to the value of your
|
1. At some point, GitLab renamed `master` to `main`. If your default branch
|
||||||
|
is named `master`, you can safely remove `main`, vice versa.
|
||||||
|
|
||||||
|
2. Remember to set the `GH_TOKEN` environment variable to the value of your
|
||||||
[personal access token] when deploying [Insiders], which can be done
|
[personal access token] when deploying [Insiders], which can be done
|
||||||
using [masked custom variables].
|
using [masked custom variables].
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user