Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: presubmit

on:
pull_request:
branches:
- master

jobs:
presubmit:
name: Presubmit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup mdBook
shell: bash
run: |
cargo version
cargo install mdbook-llms-txt-tools [email protected]

- run: mdbook build
13 changes: 9 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@ jobs:
- uses: actions/checkout@v3

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'
shell: bash
run: |
cargo version
cargo install mdbook-llms-txt-tools [email protected]

- run: mdbook build
- name: Fix the llms.txt location
run: |
mv book/llms-txt/llms.txt book/html/llms.txt
mv book/llms-txt-full/llms-full.txt book/html/llms-full.txt

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book
publish_dir: ./book/html
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ your web browser.

_Firefox:_
```bash
$ firefox book/index.html # Linux
$ open -a "Firefox" book/index.html # OS X
$ Start-Process "firefox.exe" .\book\index.html # Windows (PowerShell)
$ start firefox.exe .\book\index.html # Windows (Cmd)
$ firefox book/html/index.html # Linux
$ open -a "Firefox" book/html/index.html # OS X
$ Start-Process "firefox.exe" .\book\html\index.html # Windows (PowerShell)
$ start firefox.exe .\book\html\index.html # Windows (Cmd)
```

_Chrome:_
```bash
$ google-chrome book/index.html # Linux
$ open -a "Google Chrome" book/index.html # OS X
$ Start-Process "chrome.exe" .\book\index.html # Windows (PowerShell)
$ start chrome.exe .\book\index.html # Windows (Cmd)
$ google-chrome book/html/index.html # Linux
$ open -a "Google Chrome" book/html/index.html # OS X
$ Start-Process "chrome.exe" .\book\html\index.html # Windows (PowerShell)
$ start chrome.exe .\book\html\index.html # Windows (Cmd)
```

## Contribute to this guide
Expand Down
4 changes: 4 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ title = "TiDB Development Guide"

[output.html]
git-repository-url = "https://github.com/pingcap/tidb-dev-guide"

[output.llms-txt]

[output.llms-txt-full]