forked from mirror/grapevine
set up mdbook
This adds some new tools in CI for lint the book and also sets up automated deployment to GitLab Pages. Also adds a readme that suggests reading the book, since that's where all the information will be.
This commit is contained in:
parent
e318dfcb3d
commit
9a5e552ca0
10 changed files with 68 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -12,3 +12,6 @@ result*
|
||||||
|
|
||||||
# GitLab CI cache
|
# GitLab CI cache
|
||||||
/.gitlab-ci.d
|
/.gitlab-ci.d
|
||||||
|
|
||||||
|
# mdbook artifacts
|
||||||
|
/public
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
stages:
|
stages:
|
||||||
- ci
|
- ci
|
||||||
- artifacts
|
- artifacts
|
||||||
|
- deploy
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
# Makes some things print in color
|
# Makes some things print in color
|
||||||
|
@ -48,3 +49,14 @@ artifacts:
|
||||||
image: nixos/nix:2.18.2
|
image: nixos/nix:2.18.2
|
||||||
script:
|
script:
|
||||||
- ./bin/nix-build-and-cache packages
|
- ./bin/nix-build-and-cache packages
|
||||||
|
|
||||||
|
pages:
|
||||||
|
stage: deploy
|
||||||
|
image: nixos/nix:2.18.2
|
||||||
|
script:
|
||||||
|
- direnv exec . mdbook build
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- public
|
||||||
|
only:
|
||||||
|
- main
|
||||||
|
|
1
.lycheeignore
Symbolic link
1
.lycheeignore
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
.gitignore
|
1
.markdownlintignore
Symbolic link
1
.markdownlintignore
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
.gitignore
|
9
README.md
Normal file
9
README.md
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# Grapevine
|
||||||
|
|
||||||
|
A Matrix homeserver.
|
||||||
|
|
||||||
|
## Read the book
|
||||||
|
|
||||||
|
[Click here to read the latest version.][0]
|
||||||
|
|
||||||
|
[0]: https://matrix.pages.gitlab.computer.surgery/grapevine-fork/
|
12
book.toml
Normal file
12
book.toml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
[book]
|
||||||
|
title = "Grapevine"
|
||||||
|
language = "en"
|
||||||
|
multilingual = false
|
||||||
|
src = "book"
|
||||||
|
|
||||||
|
[build]
|
||||||
|
build-dir = "public"
|
||||||
|
|
||||||
|
[output.html]
|
||||||
|
git-repository-icon = "fa-git-square"
|
||||||
|
git-repository-url = "https://gitlab.computer.surgery/matrix/grapevine-fork"
|
3
book/SUMMARY.md
Normal file
3
book/SUMMARY.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Summary
|
||||||
|
|
||||||
|
* [Introduction](./introduction.md)
|
1
book/introduction.md
Normal file
1
book/introduction.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# Introduction
|
20
engage.toml
20
engage.toml
|
@ -30,6 +30,26 @@ name = "cargo-clippy"
|
||||||
group = "versions"
|
group = "versions"
|
||||||
script = "cargo clippy -- --version"
|
script = "cargo clippy -- --version"
|
||||||
|
|
||||||
|
[[task]]
|
||||||
|
name = "lychee"
|
||||||
|
group = "versions"
|
||||||
|
script = "lychee --version"
|
||||||
|
|
||||||
|
[[task]]
|
||||||
|
name = "markdownlint"
|
||||||
|
group = "versions"
|
||||||
|
script = "markdownlint --version"
|
||||||
|
|
||||||
|
[[task]]
|
||||||
|
name = "lychee"
|
||||||
|
group = "lints"
|
||||||
|
script = "lychee --offline ."
|
||||||
|
|
||||||
|
[[task]]
|
||||||
|
name = "markdownlint"
|
||||||
|
group = "lints"
|
||||||
|
script = "markdownlint ."
|
||||||
|
|
||||||
[[task]]
|
[[task]]
|
||||||
name = "cargo-fmt"
|
name = "cargo-fmt"
|
||||||
group = "lints"
|
group = "lints"
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
, engage
|
, engage
|
||||||
, inputs
|
, inputs
|
||||||
, jq
|
, jq
|
||||||
|
, lychee
|
||||||
|
, markdownlint-cli
|
||||||
|
, mdbook
|
||||||
, mkShell
|
, mkShell
|
||||||
, system
|
, system
|
||||||
, toolchain
|
, toolchain
|
||||||
|
@ -27,6 +30,9 @@ mkShell {
|
||||||
# Keep sorted
|
# Keep sorted
|
||||||
engage
|
engage
|
||||||
jq
|
jq
|
||||||
|
lychee
|
||||||
|
markdownlint-cli
|
||||||
|
mdbook
|
||||||
toolchain
|
toolchain
|
||||||
]
|
]
|
||||||
++
|
++
|
||||||
|
|
Loading…
Reference in a new issue