@@ -25,11 +25,11 @@ contents:
25
25
26
26
=== "Material for MkDocs"
27
27
28
- ``` yaml
29
- name: ci
28
+ ``` { . yaml .annotate }
29
+ name: ci # (1)
30
30
on:
31
31
push:
32
- branches:
32
+ branches: # (2)
33
33
- master
34
34
- main
35
35
jobs:
@@ -40,10 +40,25 @@ contents:
40
40
- uses: actions/setup-python@v2
41
41
with:
42
42
python-version: 3.x
43
- - run: pip install mkdocs-material
43
+ - run: pip install mkdocs-material # (3)
44
44
- run: mkdocs gh-deploy --force
45
45
```
46
46
47
+ 1. You can change the name to your liking.
48
+
49
+ 2. At some point, GitHub renamed `master` to `main`. If your default branch
50
+ is named `master`, you can safely remove `main`, vice versa.
51
+
52
+ 3. This is the place to install further [MkDocs plugins][3] or Markdown
53
+ extensions with `pip` to be used during the build:
54
+
55
+ ``` sh
56
+ pip install \
57
+ mkdocs-material \
58
+ mkdocs-awesome-pages-plugin \
59
+ ...
60
+ ```
61
+
47
62
=== "Insiders"
48
63
49
64
``` yaml
@@ -75,13 +90,14 @@ the workflow in action.
75
90
Your documentation should shortly appear at ` <username>.github.io/<repository> ` .
76
91
77
92
_ Remember to set the_ ` GH_TOKEN ` _ environment variable to the value of your
78
- [ personal access token] [ 3 ] when deploying [ Insiders] [ 4 ] , which can be done
79
- using [ secrets] [ 5 ] ._
93
+ [ personal access token] [ 4 ] when deploying [ Insiders] [ 5 ] , which can be done
94
+ using [ secrets] [ 6 ] ._
80
95
81
96
[ 2 ] : https://github.com/features/actions
82
- [ 3 ] : https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token
83
- [ 4 ] : insiders/index.md
84
- [ 5 ] : https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets
97
+ [ 3 ] : https://github.com/mkdocs/mkdocs/wiki/MkDocs-Plugins
98
+ [ 4 ] : https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token
99
+ [ 5 ] : insiders/index.md
100
+ [ 6 ] : https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets
85
101
86
102
### with MkDocs
87
103
@@ -94,8 +110,8 @@ mkdocs gh-deploy --force
94
110
95
111
## GitLab Pages
96
112
97
- If you're hosting your code on GitLab, deploying to [ GitLab Pages] [ 6 ] can be
98
- done by using the [ GitLab CI] [ 7 ] task runner. At the root of your repository,
113
+ If you're hosting your code on GitLab, deploying to [ GitLab Pages] [ 7 ] can be
114
+ done by using the [ GitLab CI] [ 8 ] task runner. At the root of your repository,
99
115
create a task definition named ` .gitlab-ci.yml ` and copy and paste the
100
116
following contents:
101
117
@@ -138,9 +154,9 @@ workflow in action.
138
154
Your documentation should shortly appear at ` <username>.gitlab.io/<repository> ` .
139
155
140
156
_ Remember to set the_ ` GH_TOKEN ` _ environment variable to the value of your
141
- [ personal access token] [ 3 ] when deploying [ Insiders] [ 4 ] , which can be done
142
- using [ masked custom variables] [ 8 ] ._
157
+ [ personal access token] [ 4 ] when deploying [ Insiders] [ 5 ] , which can be done
158
+ using [ masked custom variables] [ 9 ] ._
143
159
144
- [ 6 ] : https://gitlab.com/pages
145
- [ 7 ] : https://docs.gitlab.com/ee/ci/
146
- [ 8 ] : https://docs.gitlab.com/ee/ci/variables/#create-a-custom-variable-in-the-ui
160
+ [ 7 ] : https://gitlab.com/pages
161
+ [ 8 ] : https://docs.gitlab.com/ee/ci/
162
+ [ 9 ] : https://docs.gitlab.com/ee/ci/variables/#create-a-custom-variable-in-the-ui
0 commit comments