8000 GitHub Actions: use docker image for CI build · symfony/symfony-docs@a3e3428 · GitHub
[go: up one dir, main page]

Skip to content

Commit a3e3428

Browse files
committed
GitHub Actions: use docker image for CI build
1 parent 7350aac commit a3e3428

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

.docker/build/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM python:3.7-alpine
2+
3+
WORKDIR /www
4+
5+
RUN set -eux; \
6+
apk add --no-cache git make; \
7+
pip install --user sphinx;
8+
9+
COPY ./_build/.requirements.txt _build/
10+
11+
RUN pip install -r _build/.requirements.txt
12+
13+
COPY . /www

.github/workflows/ci.yaml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,13 @@ jobs:
1818
- name: "Checkout"
1919
uses: actions/checkout@v2
2020

21-
- name: "Set up Python 3.7"
22-
uses: actions/setup-python@v1
23-
with:
24-
python-version: '3.7' # Semantic version range syntax or exact version of a Python version
25-
26-
- name: "Display Python version"
27-
run: python -c "import sys; print(sys.version)"
28-
29-
- name: "Install Sphinx dependencies"
30-
run: sudo apt-get install python-dev build-essential
31-
32-
- name: "Install Sphinx"
33-
run: pip install --user sphinx
34-
35-
- name: "Install custom requirements via pip"
36-
run: pip install -r _build/.requirements.txt
21+
- name: "Build Docker image"
22+
uses: ./.docker/build
3723

3824
- name: "Build documentation"
39-
run: make -C _build SPHINXOPTS=-nW html
25+
uses: ./.docker/build
26+
with:
27+
args: make -C _build SPHINXOPTS=-nW html
4028

4129
doctor-rst:
4230
name: DOCtor-RST

0 commit comments

Comments
 (0)
0