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 !