-
Notifications
You must be signed in to change notification settings - Fork 32
51 lines (46 loc) · 1.45 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Generate ebook
on: ['push']
jobs:
ebook:
name: Build and upload
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore /property:Configuration=Release
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Install mdbook and cargo-binstall binaries
uses: taiki-e/install-action@v2
with:
tool: mdbook,cargo-binstall
- name: Install mdbook extensions
run: cargo binstall -y mdbook-mermaid mdbook-alerts mdbook-toc
# - name: Setup mdBook
# uses: peaceiris/actions-mdbook@v2
# with:
# mdbook-version: '0.4.36'
# - run: cargo install mdbook-alerts
# - name: Setup nodejs
# uses: actions/setup-node@v4
# with:
# node-version: '18'
# - name: Setup linter and spellchecker cli
# run: npm install --location=global markdownlint-cli cspell
# - name: Lint markdown files
# run: markdownlint src/**/*.md
# - name: Run spellcheck
# run: cspell src/**/*.md
- name: Build the book
run: mdbook build
- name: Deploy to Github Pages
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book