phpinternalsbook / PHP-Internals-Book

PHP Internals Book
http://www.phpinternalsbook.com/
Other
1.39k stars 177 forks source link

Publish automation #109

Closed flavioheleno closed 2 years ago

flavioheleno commented 2 years ago

This PR adds a Github Action to automate publishing the book to github-pages, closing #108.

nikic commented 2 years ago

Doesn't seem to be working, though I don't understand the error: https://github.com/phpinternalsbook/PHP-Internals-Book/runs/4781019969?check_suite_focus=true

nikic commented 2 years ago

Ah, the relevant failure is in an earlier step:

./build_release_html.sh: line 7: sphinx-build: command not found

We need to install sphinx.

flavioheleno commented 2 years ago

First and foremost, sorry!

I'll take a look at both the shell script and at the action to ensure that:

  1. The shell script returns non-zero on failure (allowing us to spot errors like this one);
  2. The action installs sphinx prior to building the release.
flavioheleno commented 2 years ago

@nikic I had to extract the commands from the shell script and put them straight into the action, so that I could use both Python for Sphinx and then PHP for the redirects. Are you ok with that? You can see it before the PR here: https://github.com/flavioheleno/PHP-Internals-Book/commit/89c3279aa841cb9ec468ecea1a307121afbd1624

nikic commented 2 years ago

@flavioheleno Not sure I get why they need to be separated. If you install both Python and PHP first, shouldn't it work?

flavioheleno commented 2 years ago

I had no idea you could install both and have them available to next steps! Reverting back to using the shell script :)