|
8 | 8 |
|
9 | 9 | jobs:
|
10 | 10 | build:
|
11 |
| - runs-on: ubuntu-20.04 |
| 11 | + runs-on: ubuntu-22.04 |
12 | 12 | strategy:
|
13 | 13 | matrix:
|
14 | 14 | branch:
|
15 | 15 | - master
|
16 |
| - - stable |
| 16 | + - 3.6 |
17 | 17 | steps:
|
18 | 18 | - uses: actions/checkout@v3
|
19 | 19 | with:
|
|
23 | 23 | run: |
|
24 | 24 | sudo pip3 install -r requirements.txt
|
25 | 25 | sudo pip3 install codespell
|
| 26 | + sudo apt update |
| 27 | + sudo apt install parallel libwebp7 |
26 | 28 |
|
27 |
| - - name: Sphinx build HTML |
| 29 | + - name: Sphinx - Build HTML |
28 | 30 | run: make SPHINXOPTS='--color' html
|
29 | 31 |
|
30 | 32 | - uses: actions/upload-artifact@v3
|
|
34 | 36 | # Keep the current build and the previous build (in case a scheduled build failed).
|
35 | 37 | # This makes it more likely to have at least one successful build available at all times.
|
36 | 38 | retention-days: 15
|
| 39 | + |
| 40 | + - name: Sphinx - Build ePub |
| 41 | + run: | |
| 42 | + # Convert WebP images to PNG and replace references, so that ePub readers can display those images. |
| 43 | + # The ePub 3.0 specification has WebP support, but it's not widely supported by apps and e-readers yet. |
| 44 | + shopt -s globstar nullglob |
| 45 | + parallel --will-cite convert {} {.}.png ::: {about,community,contributing,getting_started,img,tutorials}/**/*.webp |
| 46 | + parallel --will-cite sed -i "s/\\.webp$/\\.png/g" ::: {about,community,contributing,getting_started,tutorials}/**/*.rst |
| 47 | +
|
| 48 | + # Remove banners at the top of each page when building `latest`. |
| 49 | + sed -i 's/"godot_is_latest": True/"godot_is_latest": False/' conf.py |
| 50 | + sed -i 's/"godot_show_article_status": True/"godot_show_article_status": False/' conf.py |
| 51 | +
|
| 52 | + make SPHINXOPTS='--color' epub |
| 53 | +
|
| 54 | + - uses: actions/upload-artifact@v3 |
| 55 | + with: |
| 56 | + name: godot-docs-epub-${{ matrix.branch }} |
| 57 | + path: _build/epub/GodotEngine.epub |
| 58 | + # Keep the current build and the previous build (in case a scheduled build failed). |
| 59 | + # This makes it more likely to have at least one successful build available at all times. |
| 60 | + retention-days: 15 |
0 commit comments