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

Documentation build fails on Travis CI #57

Open
mschmidt87 opened this issue Nov 13, 2020 · 2 comments
Open

Documentation build fails on Travis CI #57

mschmidt87 opened this issue Nov 13, 2020 · 2 comments

Comments

@mschmidt87
Copy link

Hi,
I am trying to switch our documentation build from normal sphinx to sphinx-multiversion. Locally, I can run everything just fine, but the deployment using Travis fails. This is the output of my job on Travis:
https://travis-ci.org/github/Happy-Algorithms-League/hal-cgp/jobs/743167629

I am trying to build the documentation for the master branch and for one release tag (0.2.0) but it fails to find both, if I understand correctly (error message saying:

Failed load config for refs/tags/0.2.0 from /tmp/tmpwju7f358/f6143c5620f203c0d60363154278b294b603734b/docs
Failed load config for refs/heads/master from /tmp/tmpwju7f358/f6143c5620f203c0d60363154278b294b603734b/docs
No matching refs found!```).

I thought that I might need to fetch all tags explicitly, that's why I added a git fetch --all --tags to the .travis.yml but that didn't help.

This is the complete travis config file: https://github.com/Happy-Algorithms-League/hal-cgp/blob/sphinx_doc/multi_version/.travis.yml

and the actual documentation build is done in a deploy.sh script, which is:

make -C docs/ clean
make -C docs/ html
touch docs/_build/html/.nojekyll

where my Makefile then executes (inside the docs/ folder):

sphinx-multiversion  -D reset_argv=1 . _build/html

This is using the latest release (0.2.4).

@opcon
Copy link

opcon commented Nov 27, 2020

I ran into a similar issue on GitLab CI.
It turns out only remote branches were available (checked by adding git for-each-ref --format '%(objectname) %(refname) %(creatordate:iso)' refs to my ci script), and smv_remote_whitelist was not set in my configuration, disallowing all remote branches by default.

After setting smv_remote_whitelist = r'^(origin)$', the documentation is deployed as expected.
Hopefully that might help!

As an aside, @Holzhaus: is there a way to enable debug logging through a command-line switch? This would have helped narrow down the issue.

@samuel-emrys
Copy link

samuel-emrys commented Jun 2, 2021

@opcon not the author, but having looked at the code it doesn't appear so. If you're willing to put a PR together it would be trivial to add an argparse option and proxy it to sphinx-build, which accepts a -P flag to start a pdb session if an exception is raised.

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

Successfully merging a pull request may close this issue.

3 participants