Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,25 @@ jobs:
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yaml
environment-name: docs
create-args: >-
python=3.9
sphinx
sphinxcontrib-serializinghtml
setuptools

- name: Safe workflow for build preview
run: if [ -d "_build" ]; then rm -rf _build; fi

- name: Build page and Translations
if: contains(github.event.comment.body, '#preview')
run: |
micromamba activate docs
python -c "import imghdr" # Check if imghdr is available
make gettext html

- name: Create nojekyll file
run: |
touch _build/.nojekyll
run: touch _build/.nojekyll

- name: Deploy documentation sphinx
uses: JamesIves/[email protected]
Expand All @@ -55,3 +62,4 @@ jobs:
with:
issue-number: ${{github.event.issue.number}}
body: "This PR has been built with Sphinx and can be previewed at: https://fortran-lang.github.io/fpm/pr/${{github.event.issue.number}}"

12 changes: 10 additions & 2 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,17 @@ jobs:
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yaml

- name: Build pages
environment-name: docs
create-args: >-
python=3.9
sphinx
sphinxcontrib-serializinghtml
setuptools

- name: Activate environment and build pages
run: |
micromamba activate docs
python -c "import imghdr"
make gettext html

- name: Create nojekyll file
Expand Down
Loading