Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't require Makefile? #2

Closed
mgeier opened this issue Dec 16, 2019 · 2 comments
Closed

Don't require Makefile? #2

mgeier opened this issue Dec 16, 2019 · 2 comments

Comments

@mgeier
Copy link

mgeier commented Dec 16, 2019

I've just tried sphinx-action and got this error:

Traceback (most recent call last):
  File "/entrypoint.py", line 22, in <module>
    action.build_all_docs(github_env, sys.argv[1:])
  File "/sphinx_action/action.py", line 124, in build_all_docs
    return_code, annotations = build_docs(docs_dir)
  File "/sphinx_action/action.py", line 99, in build_docs
    with open(log_file, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/sphinx-log'
##[error]Docker run failed with exit code 1

It took me a while, but I found out that the real error is a few lines further up:

make: *** No rule to make target 'html'.  Stop.

I'm not using a Makefile in my project (because I don't like it, see e.g. sphinx-doc/sphinx#5618).

It would be great to support workflows without Makefile.

For example, https://readthedocs.org/ doesn't require having a Makefile; they somehow automagically find a conf.py and start Sphinx from there, without needing a Makefile.

@ammaraskar
Copy link
Owner

Sorry for the late reply, this should now be possible with a customizable build-command, see for example:

https://github.com/ammaraskar/sphinx-action-test/blob/dfbc77eb2ad027cdc3a1e5522b2c73729377724c/.github/workflows/default.yml#L25

You can now directly invoke sphinx-build or your own custom command.

@mgeier
Copy link
Author

mgeier commented Dec 24, 2019

Thanks a lot!

I'm having troubles specifying the repo root directory as build directory (with build-command: python3 setup.py build_sphinx).

When I use ...

docs-folder: ""

... I get this error:

FileNotFoundError: [Errno 2] No such file or directory: ''

And when I use ...

docs-folder: .

... I get this error:

error: option --no-color not recognized

How can I specify the repo root?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants