File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -124,3 +124,31 @@ deploy: book
124
124
git commit -m "deployed on $(shell date) by ${USER}" && \
125
125
git push origin gh-pages
126
126
` ` `
127
+
128
+ # # Deploying Your Book to GitLab Pages
129
+ Inside your repository's project root, create a file named `.gitlab-ci.yml` with the following contents :
130
+ ` ` ` yml
131
+ stages:
132
+ - deploy
133
+
134
+ pages:
135
+ stage: deploy
136
+ image: rust:alpine
137
+ variables:
138
+ CARGO_HOME: $CI_PROJECT_DIR/cargo
139
+ before_script:
140
+ - export PATH="$PATH:$CARGO_HOME/bin"
141
+ - mdbook --version || cargo install mdbook
142
+ script:
143
+ - mdbook build -d public
144
+ only:
145
+ - master
146
+ artifacts:
147
+ paths:
148
+ - public
149
+ cache:
150
+ paths:
151
+ - $CARGO_HOME/bin
152
+ ` ` `
153
+
154
+ After you commit and push this new file, GitLab CI will run and your book will be available!
You can’t perform that action at this time.
0 commit comments