Skip to content

Commit

Permalink
Reimplement docs using mdBook
Browse files Browse the repository at this point in the history
  • Loading branch information
rbtcollins committed Jul 18, 2024
1 parent 9621e1b commit a5733f5
Show file tree
Hide file tree
Showing 30 changed files with 521 additions and 1,076 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI
on: [push, pull_request]

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install stable
rustup default stable
- name: Install latest mdbook
run: |
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
mkdir bin
curl -sSL $url | tar -xz --directory=bin
echo "$(pwd)/bin" >> $GITHUB_PATH
- name: Run tests
run: mdbook test doc
13 changes: 13 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Deploy mdBook
on: [push]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write # To push a branch
pull-requests: write # To create a PR from that branch
steps:
- uses: actions/checkout@v4
- uses: XAMPPRocky/deploy-mdbook@v1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 0 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ jobs:
run: |
python -W once -m testtools.run testrepository.tests.test_suite
- name: Docs
run: |
make -C doc html
success:
needs: build
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"MD025": false
"MD013": false
2 changes: 1 addition & 1 deletion COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ limitations under that license.
A concordance of contributors is maintained here to provide an easy reference
for distributions such as Debian that wish to list all the copyright holders
in their metadata:
* Robert Collins <robertc@robertcollins.net>, 2009
* Robert Collins <robertc@robertcollins.net>, 2009, 2024
* Hewlett-Packard Development Company, L.P., 2013
* IBM Corp., 2013

Expand Down
1 change: 1 addition & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
book
Loading

0 comments on commit a5733f5

Please sign in to comment.