File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -124,3 +124,31 @@ deploy: book
124124 git commit -m "deployed on $(shell date) by ${USER}" && \
125125 git push origin gh-pages
126126` ` `
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:latest
137+ variables:
138+ CARGO_HOME: $CI_PROJECT_DIR/cargo
139+ before_script:
140+ - export PATH="$PATH:$CARGO_HOME/bin"
141+ - mdbook --version || cargo install --debug 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