Skip to content

Commit 8169e7f

Browse files
Updated GitLab publishing guide (#3393)
Default branch for GitLab is main and no more master
1 parent e1cf043 commit 8169e7f

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

docs/publishing-your-site.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ contents:
126126
image: python:latest
127127
pages:
128128
stage: deploy
129-
only:
129+
only: # (1)!
130130
- master
131+
- main
131132
script:
132133
- pip install mkdocs-material
133134
- mkdocs build --site-dir public
@@ -136,23 +137,30 @@ contents:
136137
- public
137138
```
138139

140+
1. At some point, GitLab renamed `master` to `main`. If your default branch
141+
is named `master`, you can safely remove `main`, vice versa.
142+
139143
=== "Insiders"
140144

141145
``` yaml
142146
image: python:latest
143147
pages:
144148
stage: deploy
145-
only:
149+
only: # (1)!
146150
- master
147-
script: # (1)!
151+
- main
152+
script: # (2)!
148153
- pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
149154
- mkdocs build --site-dir public
150155
artifacts:
151156
paths:
152157
- public
153158
```
154159

155-
1. Remember to set the `GH_TOKEN` environment variable to the value of your
160+
1. At some point, GitLab renamed `master` to `main`. If your default branch
161+
is named `master`, you can safely remove `main`, vice versa.
162+
163+
2. Remember to set the `GH_TOKEN` environment variable to the value of your
156164
[personal access token] when deploying [Insiders], which can be done
157165
using [masked custom variables].
158166

0 commit comments

Comments
 (0)