Skip to content

Commit 3014870

Browse files
Rework help system (#4)
* Use pandoc (windows build) * use chocolatey * add build-pdf.ps1 * remove hardcoded path * rework script * prettier
1 parent e4d2d93 commit 3014870

File tree

5,683 files changed

+1697911
-1612179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,683 files changed

+1697911
-1612179
lines changed

.github/workflows/generate_pdf.yml

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,47 @@ name: CI
33
on: [push]
44

55
jobs:
6-
build:
7-
runs-on: ubuntu-latest
6+
build-windows:
7+
runs-on: windows-latest
88

99
steps:
1010
- uses: actions/checkout@v4
11-
- run: docker run --rm -v "$PWD:/gitbook" -p 4000:4000 billryan/gitbook gitbook init
12-
- run: |
13-
cd /home/runner/work/nelson-gitbook/nelson-gitbook
14-
docker run --rm -v "$PWD:/gitbook" -p 4000:4000 billryan/gitbook gitbook pdf ./markdown
15-
- run: mkdir /home/runner/work/nelson-gitbook/nelson-gitbook/artifacts
16-
- run: cp /home/runner/work/nelson-gitbook/nelson-gitbook/*.pdf /home/runner/work/nelson-gitbook/nelson-gitbook/artifacts
17-
- uses: actions/upload-artifact@v4
11+
12+
- name: Install tools via Chocolatey
13+
run: |
14+
Write-Host "Installing tools via Chocolatey..."
15+
16+
# Install Pandoc
17+
choco install pandoc -y
18+
19+
# Install wkhtmltopdf
20+
choco install wkhtmltopdf -y
21+
22+
# Install Inkscape
23+
choco install inkscape -y
24+
25+
Write-Host "All tools installed successfully via Chocolatey"
26+
shell: powershell
27+
28+
- name: Verify installations
29+
run: |
30+
Write-Host "Verifying Pandoc..."
31+
pandoc --version
32+
33+
Write-Host "`nVerifying wkhtmltopdf..."
34+
wkhtmltopdf --version
35+
36+
Write-Host "`nVerifying Inkscape..."
37+
inkscape --version
38+
shell: powershell
39+
40+
- name: Build PDF
41+
run: |
42+
.\pandoc-build-pdf.bat
43+
shell: cmd
44+
45+
- name: Upload PDF artifacts
46+
uses: actions/upload-artifact@v4
1847
with:
19-
name: nelson-gitbook-github-action-artifacts
20-
path: artifacts/
48+
name: nelson-pdf
49+
path: "*.pdf"

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ node_modules/
33
package-lock.json
44
book
55
docs/index.md
6+
all_fr_files.txt
7+
all_en_files.txt
8+
temp_combined.md
9+
nelson-en.pdf
10+
nelson-fr.pdf

book.toml

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)