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

Check sphinx docs action only works with specific sphinx versions #8

Closed
niksirbi opened this issue Jan 5, 2023 · 2 comments · Fixed by #13
Closed

Check sphinx docs action only works with specific sphinx versions #8

niksirbi opened this issue Jan 5, 2023 · 2 comments · Fixed by #13
Assignees
Labels
bug Something isn't working

Comments

@niksirbi
Copy link
Member

niksirbi commented Jan 5, 2023

As we discovered in this PR, the action we rely on for checking that Sphinx documentation builds succesfully breaks with some versions of Sphinx.
This problem seems to have appeared after the Sphinx 6.0.0 release (Dec 29 2022).
As a temporary solution, Sphinx needs to be constrained to v5, by adding the following line to the docs/requirements.txt of repositories that rely on this action:

sphinx>=5.0,<6.0

The underlying issue probably come from upstream - ammaraskar/sphinx-action - because a very old version of Sphinx is used in the docker image see this PR.

@niksirbi
Copy link
Member Author

niksirbi commented Mar 4, 2023

In general, the above sphinx-action hasn't been updated recently and has accumulated a number of issues. Relying on it is risky, so I think we have to find some alternative way of checking whether the docs still build

@niksirbi
Copy link
Member Author

niksirbi commented Mar 6, 2023

@samcunliffe suggested replacing the check_docs action with the solution below:

For the future, we will still need an action that checks the docs build upon PRs (any ideas @samcunliffe ?)

Agree that we want this. You could make the workflow happen on all pushes and pull requests, then put an if guard just before the Deploy step.

  - name: Deploy
    if: github.event_name == 'push' && github.ref_name == 'main'
    env: 
      GITHUB_TOKEN: ${{ inputs.secret_input }}
    uses: peaceiris/actions-gh-pages@v3
    with:
      github_token: ${{ env.GITHUB_TOKEN }}
      publish_dir: ./docs/build

I have a similarish two-job workflow to build and then publish docs for another project. My deploy/upload/publish (whatever you want to call it) happens as a separate job, rather than a step in a single job but an if-guarded step should be equivalent.

@niksirbi niksirbi linked a pull request Mar 13, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant