#๐Ÿ”’ Can not build my Sphinx doc with github action

4 messages ยท Page 1 of 1 (latest)

echo ginkgo
#

Hello, I am trying for the first time to make a python documentation for my package and host it in Github Pages. I followed tutorials but I get this error that occures during the "build html" job and that I can't figure out :

[sphinx-action] Running: ['make', 'html', '-e']
Traceback (most recent call last):
  File "/entrypoint.py", line 22, in <module>
    action.build_all_docs(github_env, [os.environ.get("INPUT_DOCS-FOLDER")])
  File "/sphinx_action/action.py", line 152, in build_all_docs
    return_code, annotations = build_docs(github_env.build_command, docs_dir)
  File "/sphinx_action/action.py", line 134, in build_docs
    with open(log_file, "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/sphinx-log'

Here is my github workflow file :

name: "Build and deploy Github pages"

on:
  push:         
    branches:
      - master  

jobs:

  build:
    runs-on: ubuntu-latest
    permissions:
      contents: write

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Build html
        uses: ammaraskar/sphinx-action@master
        with:
          docs-folder: "doc/"

      - name: Upload artifacts
        uses: actions/upload-artifact@v4
        with:
          name: html-docs
          path: build/html/

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        if: github.ref == 'refs/heads/master'
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: build/html

I also have a simple requirement.txt file :

sphinx
sphinx_rtd_theme
numpy

Does anyone have any idea of what I am doing wrong ? Thanks in advance !

golden thunderBOT
#

@echo ginkgo

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

golden thunderBOT
#

@echo ginkgo

Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.