'Sphinx Workflow and GitHub Action
I am writing a Python package. The code documentation should be realized via a workflow on a GitHub page. I have the following folder structure:
D:.
│ .gitignore
│ .pylintrc
│ LICENSE
│ README.md
│ requirements.txt
│ setup.py
│
├───.github
│ └───workflows
│ pylint.yml
│ pypi.yml
│ sphinx.yml
│
├───docs
│ conf.py
│
└───riffecx
__init__.py
__main__.py
The Python source code works and even the linter works. All other workflows also run without problems.
Here is my Sphinx workflow as sphinx.yml
name: "Pull Request Docs Check"
on:
- push
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: make folder
run: |
mkdir /tmp/sphinx-log
- uses: ammaraskar/sphinx-action@master
with:
docs-folder: "docs/"
The source code for the workflow is from the github action page. I have changed the pull_request to a push, because it should run again after each push. https://github.com/marketplace/actions/sphinx-build
Here I put the error log of the workflow. Error:
make: *** No rule to make target 'html'. Stop.
[sphinx-action] Starting sphinx-action build.
Running:
====================================
Building docs in docs/
====================================
Traceback (most recent call last):
[sphinx-action] Running: ['make', 'html', '-e']
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'
Example: https://github.com/Riffecs/riffecx/runs/6498919334?check_suite_focus=true
Unfortunately, I have a complete error in thinking somewhere. So I thought that I get the sphinx files either as a branch or as an artifact and from there I can "upload" them to the GitHub page. But obviously I think wrong there. can you help me there?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
