Skip to content

Commit

Permalink
Initial commit of mdbook
Browse files Browse the repository at this point in the history
  • Loading branch information
jhugman committed Aug 15, 2024
1 parent 856b639 commit 766e9d2
Show file tree
Hide file tree
Showing 7 changed files with 594 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/mdbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Run mdbook on deploy
on:
pull_request:
branches: ["main"]
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jontze/action-mdbook@v3
with:
token: ${{secrets.GITHUB_TOKEN}}
# Optional Plugins have to be enabled
use-linkcheck: true
use-mermaid: false
use-toc: true
use-opengh: true
use-admonish: true
use-katex: false
- name: Show mdbook version
run: mdbook --version
- name: Show linkchecker version
run: mdbook-linkcheck --version
# - name: Show mermaid version
# run: mdbook-mermaid --version
- name: Show toc version
run: mdbook-toc --version
- name: Show open-on-gh version
run: mdbook-open-on-gh --version
- name: Show admonish version
run: mdbook-admonish --version
- name: Deploy GitHub Pages
run: |
# This assumes your book is in the root of your repository.
# Just add a `cd` here if you need to change to another directory.
cd docs
mdbook build
git worktree add gh-pages
git config user.name "Deploy from CI"
git config user.email ""
cd gh-pages
# Delete the ref to avoid keeping history.
git update-ref -d refs/heads/gh-pages
rm -rf *
mv ../book/* .
git add .
git commit -m "Deploy $GITHUB_SHA to gh-pages"
git push --force --set-upstream origin gh-pages
Loading

0 comments on commit 766e9d2

Please sign in to comment.