Skip to content

Commit 27f5543

Browse files
authored
Use official Sphinx image (#822)
1 parent 36f6be3 commit 27f5543

File tree

4 files changed

+22
-5
lines changed

4 files changed

+22
-5
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,13 @@ jobs:
1717
with:
1818
fetch-depth: 0
1919

20+
- name: Set release/tag
21+
run: |
22+
git describe --tags --long --always > RELEASE || true
23+
git describe --tags --exact-match > TAG || true
24+
2025
- name: Build
21-
uses: docker://ghcr.io/kastelo/sphinx-build
26+
uses: docker://docker.io/sphinxdoc/sphinx-latexpdf:latest
2227
with:
2328
entrypoint: make
2429
args: html man latexpdf

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ _build/
22
_deployed
33
_deployed.old
44
_syncthing
5+
/RELEASE
6+
/TAG

conf.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,19 @@
6262
# built documents.
6363
#
6464
# The full version, including alpha/beta/rc tags.
65+
66+
release = 'v1'
6567
try:
68+
release = open('RELEASE', 'r').read().strip()
69+
except FileNotFoundError:
6670
release = os.popen('git describe --tags --long --always').read().strip()
71+
72+
_git_tag = ''
73+
try:
74+
_git_tag = open('TAG', 'r').read().strip()
75+
except FileNotFoundError:
6776
_git_tag = os.popen('git describe --tags --exact-match').read().strip()
68-
except Exception:
69-
release = 'v1'
70-
_git_tag = ''
77+
7178
# The short X.Y version.
7279
version = release.partition('-')[0]
7380

docker-build.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4+
git describe --tags --long --always > RELEASE || true
5+
git describe --tags --exact-match > TAG || true
6+
47
target="${1:-html}"
58
docker run --rm \
69
-v "$(pwd):$(pwd)" \
710
-w "$(pwd)" \
8-
ghcr.io/kastelo/sphinx-build:latest \
11+
docker.io/sphinxdoc/sphinx-latexpdf:latest \
912
make "$target"

0 commit comments

Comments
 (0)