Update site to use mdBook instead of deprecated GitBook
parent
16489b747c
commit
3964f8b1e7
|
@ -1,2 +1 @@
|
|||
/_book/
|
||||
/node_modules/
|
||||
book
|
||||
|
|
|
@ -1,33 +1,21 @@
|
|||
# requiring the environment of NodeJS 8.9.x LTS (carbon)
|
||||
image: node:10
|
||||
stages:
|
||||
- deploy
|
||||
|
||||
# add 'node_modules' to cache for speeding up builds
|
||||
cache:
|
||||
paths:
|
||||
- node_modules/ # Node modules and dependencies
|
||||
|
||||
before_script:
|
||||
- npm install gitbook-cli -g # install gitbook
|
||||
- gitbook fetch 3.2.3 # fetch latest stable version
|
||||
- gitbook install # add any requested plugins in book.json
|
||||
|
||||
test:
|
||||
stage: test
|
||||
script:
|
||||
- gitbook build . public # build to public path
|
||||
only:
|
||||
- branches # this job will affect only the 'master' branch
|
||||
except:
|
||||
- master
|
||||
|
||||
# the 'pages' job will deploy and build your site to the 'public' path
|
||||
pages:
|
||||
stage: deploy
|
||||
image: rust:latest
|
||||
variables:
|
||||
CARGO_HOME: $CI_PROJECT_DIR/cargo
|
||||
before_script:
|
||||
- export PATH="$PATH:$CARGO_HOME/bin"
|
||||
- mdbook --version || cargo install --debug mdbook
|
||||
script:
|
||||
- gitbook build . public # build to public path
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
expire_in: 1 week
|
||||
- mdbook build -d public
|
||||
only:
|
||||
- master # this job will affect only the 'master' branch
|
||||
- master
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
cache:
|
||||
paths:
|
||||
- $CARGO_HOME/bin
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# Introduction
|
||||
The following is a dump of Git commands for use on your shell of choice.
|
||||
|
||||
This book is [generated with GitBook](https://github.com/GitbookIO/gitbook) and hosted by [GitLab Pages](https://gitlab.com/strivinglife/book-git-commands).
|
||||
This book is [generated with mdBook](mdbook) and hosted by [GitLab Pages](https://gitlab.com/strivinglife/book-git-commands).
|
||||
|
||||
If you'd like to setup your own book, I'd recommend taking a look at [this example repository](https://gitlab.com/pages/gitbook) and [the official book's code](https://github.com/GitbookIO/gitbook/tree/master/docs).
|
||||
|
||||
The book can be served locally by running `gitbook serve`.
|
||||
The book can be served locally by running `mdbook serve`.
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
[book]
|
||||
authors = ["James Skemp"]
|
||||
language = "en"
|
||||
multilingual = false
|
||||
src = "src"
|
||||
title = "Git Commands by James Skemp"
|
|
@ -1,9 +1,9 @@
|
|||
# Summary
|
||||
|
||||
* [Introduction](README.md)
|
||||
* [Introduction](introduction.md)
|
||||
* [Notes and warnings](notes.md)
|
||||
* [Getting Started](getting-started.md)
|
||||
* Configuration
|
||||
* [Configuration](configuration.md)
|
||||
* [User information](configuration/user.md)
|
||||
* [Git configuration](configuration/git.md)
|
||||
* [Repository information](configuration/repository.md)
|
||||
|
@ -15,10 +15,10 @@
|
|||
* [Tags](tags.md)
|
||||
* [Logging](logging.md)
|
||||
|
||||
### Examples
|
||||
## Examples
|
||||
* [Updating a fork](example/update-fork.md)
|
||||
* [Create a new repo from a subdirectory](example/create-new-repo-from-subdirectory.md)
|
||||
|
||||
--
|
||||
## Related
|
||||
|
||||
* [Related links](related.md)
|
|
@ -0,0 +1,6 @@
|
|||
# Configuration
|
||||
The following sections covers general configuration and information.
|
||||
|
||||
* [User information](configuration/user.md)
|
||||
* [Git configuration](configuration/git.md)
|
||||
* [Repository information](configuration/repository.md)
|
|
@ -0,0 +1,6 @@
|
|||
# Introduction
|
||||
The following is a dump of Git commands for use on your shell of choice.
|
||||
|
||||
This book is [generated with mdBook](mdbook) and hosted by [GitLab Pages](https://gitlab.com/strivinglife/book-git-commands).
|
||||
|
||||
The book can be served locally by running `mdbook serve`.
|
Loading…
Reference in New Issue