Skip to content

Commit 46f660f

Browse files
authored
Update build process and unicode handling (#126)
* set XeLaTeX as pandoc engine for build actions * Update actions * Change fonts for better unicode support * Add dejavu font
1 parent 15efa79 commit 46f660f

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

.github/workflows/on_push.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v2
1111

12-
- uses: rlespinasse/github-slug-action@v3.x
12+
- uses: rlespinasse/github-slug-action@v5
1313

1414
- name: Create version number
1515
run: echo "VERSION=commit-${{ env.GITHUB_SHA_SHORT }}" >> $GITHUB_ENV
@@ -30,7 +30,7 @@ jobs:
3030
- name: Create the release PDFs
3131
run: docker run -e VERSION=${{ env.VERSION }} -v $GITHUB_WORKSPACE/files/releases:/opt/input -v $GITHUB_WORKSPACE/out/releases:/opt/output time-machine-project/publish_pdfs
3232

33-
- uses: actions/upload-artifact@v2
33+
- uses: actions/upload-artifact@v4
3434
with:
3535
name: rfc_pdf_files
3636
path: out

.github/workflows/on_release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
1313

1414
- name: Create version number
1515
run: echo "VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
@@ -24,7 +24,7 @@ jobs:
2424
run: docker run -e VERSION=${{ env.VERSION }} -v $GITHUB_WORKSPACE/files:/opt/input -v $GITHUB_WORKSPACE/out:/opt/output time-machine-project/publish_book
2525

2626
- name: Upload the artifacts
27-
uses: alexellis/upload-assets@0.2.2
27+
uses: alexellis/upload-assets@0.4.0
2828
with:
2929
asset_paths: '["./out/*.pdf"]'
3030
env:

build/Dockerfile.book

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ RUN apk update && apk upgrade && apk add --no-cache \
1111
freetype-dev \
1212
harfbuzz \
1313
ca-certificates \
14-
ttf-freefont
14+
ttf-freefont \
15+
ttf-dejavu
1516

1617
RUN tlmgr install koma-script
1718

build/Dockerfile.single

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ RUN apk update && apk upgrade && apk add --no-cache \
1111
freetype-dev \
1212
harfbuzz \
1313
ca-certificates \
14-
ttf-freefont
14+
ttf-freefont \
15+
ttf-dejavu
1516

1617
COPY ./convert_single.sh /opt/script/
1718

build/convert_book.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ for md in $(find . -type f -name "*.md" -not -name "RFC-template.md" -not -name
7171
done
7272

7373
# Build pdf
74-
pandoc -s -M date="Release $version - $(date "+%B %e, %Y")" --toc -f markdown -o "$pdfpath" <(echo "$text")
74+
pandoc -s --pdf-engine=xelatex -V mainfont="DejaVu Serif" -V sansfont="DejaVu Sans" -V monofont="DejaVu Sans Mono" -M date="Release $version - $(date "+%B %e, %Y")" --toc -f markdown -o "$pdfpath" <(echo "$text")
7575

7676
# Remove temporary files
7777
cd ..

build/convert_single.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ find $inpath -name '*.md' -print0 |
1313
name=$(basename "$file" .md)
1414
echo "building: $version_text $name"
1515
sed -i "s/-release-version-/$version_text - $(date '+%Y-%m-%d')/" ./"$name".md
16-
pandoc -s -i ./"$name".md -o ../"$name".pdf
16+
pandoc -s --pdf-engine=xelatex -V mainfont="DejaVu Serif" -V sansfont="DejaVu Sans" -V monofont="DejaVu Sans Mono" -i ./"$name".md -o ../"$name".pdf
1717
rm -Rf "$outpath"/build
1818
done

0 commit comments

Comments
 (0)