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

Add Sphinx preview workflow #812

Merged
merged 9 commits into from
Dec 10, 2020
Merged

Add Sphinx preview workflow #812

merged 9 commits into from
Dec 10, 2020

Conversation

charlesbluca
Copy link
Member

This updates the workflow executed when a local PR is opened to make changes to the website. Now, when a PR is made to change the website, this workflow will:

  • Build the Sphinx site using the head branch's source code
  • Push the build to a branch of gh-pages called [head_branch]-preview, creating the branch if it doesn't already exist
  • Leave a comment on the PR with a link to the preview website, served using Raw GitHack (this will only happen once when the preview branch is created, and will be skipped on subsequent updates)

This should be useful for if a user wants to make changes to elements of the website with precise formatting, but doesn't have the ability to do so on their local machine.

Some minor things to note:

  • This will only work on PRs from branches within this repo - if a PR is made from a forked branch, only the standard build tests will be done.
  • Unexpected behavior will occur if the -preview branch is already in use for something else; this doesn't seem likely as it would require the existence of both [head_branch] AND [head_branch]-preview, but if it becomes an issue the naming convention can be easily changed in the future.

@charlesbluca charlesbluca merged commit bccc93d into master Dec 10, 2020
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 this pull request may close these issues.

1 participant