Skip to content

Commit 80d0385

Browse files
authored
fix Python env for pages (#150)
1 parent b7a83b7 commit 80d0385

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

.github/workflows/preview.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,25 @@ jobs:
2626
uses: mamba-org/setup-micromamba@v1
2727
with:
2828
environment-file: environment.yaml
29+
environment-name: docs
30+
create-args: >-
31+
python=3.9
32+
sphinx
33+
sphinxcontrib-serializinghtml
34+
setuptools
2935
3036
- name: Safe workflow for build preview
3137
run: if [ -d "_build" ]; then rm -rf _build; fi
3238

3339
- name: Build page and Translations
3440
if: contains(github.event.comment.body, '#preview')
3541
run: |
42+
micromamba activate docs
43+
python -c "import imghdr" # Check if imghdr is available
3644
make gettext html
3745
3846
- name: Create nojekyll file
39-
run: |
40-
touch _build/.nojekyll
47+
run: touch _build/.nojekyll
4148

4249
- name: Deploy documentation sphinx
4350
uses: JamesIves/github-pages-deploy-action@v4.6.1
@@ -55,3 +62,4 @@ jobs:
5562
with:
5663
issue-number: ${{github.event.issue.number}}
5764
body: "This PR has been built with Sphinx and can be previewed at: https://fortran-lang.github.io/fpm/pr/${{github.event.issue.number}}"
65+

.github/workflows/sphinx.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,17 @@ jobs:
2828
uses: mamba-org/setup-micromamba@v1
2929
with:
3030
environment-file: environment.yaml
31-
32-
- name: Build pages
31+
environment-name: docs
32+
create-args: >-
33+
python=3.9
34+
sphinx
35+
sphinxcontrib-serializinghtml
36+
setuptools
37+
38+
- name: Activate environment and build pages
3339
run: |
40+
micromamba activate docs
41+
python -c "import imghdr"
3442
make gettext html
3543
3644
- name: Create nojekyll file

0 commit comments

Comments
 (0)