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

Deploy live doc on push to develop #36636

Merged
merged 14 commits into from
Nov 10, 2023
Merged

Conversation

kwankyu
Copy link
Collaborator

@kwankyu kwankyu commented Nov 3, 2023

Live doc is built separately from the usual doc preview on push to develop, and deployed to Netlify.

Sample deployment: https://deploy-livedoc--sagemath.netlify.app/html/en/a_tour_of_sage/

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@kwankyu kwankyu changed the title p/deploy livedoc Deploy live doc on push to develop Nov 3, 2023
@kwankyu kwankyu marked this pull request as ready for review November 3, 2023 12:32

- name: Build live doc
id: buildlivedoc
if: always() && steps.copy.outcome == 'success' && github.ref == 'refs/heads/develop'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps should also conditionalize on github.repository == 'sagemath/sage' so that it does not run in users' forks if they push a change to their develop (instead of creating a specific branch)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Thanks.

Copy link
Collaborator Author

@kwankyu kwankyu Nov 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I need always() for "Build live doc", "Copy live doc" and "Upload live doc" steps? Perhaps yes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to use success() || failure(), see #36617

Copy link
Collaborator Author

@kwankyu kwankyu Nov 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending to commit the change github.repository == 'sagemath/sage until #36636 (comment) finishes on my own repo.

Copy link
Collaborator Author

@kwankyu kwankyu Nov 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

@mkoeppe mkoeppe Nov 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this seems to be a bug on github side.

No, this behavior is by design, but one needs to use it sparingly. Essentially only for releasing resources or for saving logs.

Copy link
Collaborator Author

@kwankyu kwankyu Nov 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending to commit the change github.repository == 'sagemath/sage

When done, please go ahead and set the label "positive review".

Copy link
Collaborator Author

@kwankyu kwankyu Nov 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks.

@mkoeppe
Copy link
Contributor

mkoeppe commented Nov 3, 2023

Which version of Sage does the binder environment run? Is it always running the current develop version? Is there a mechanism that triggers the rebuild?

@kwankyu
Copy link
Collaborator Author

kwankyu commented Nov 3, 2023

The default branch (master) runs the latest release. The dev branch runs the latest develop version.

Both branches are updated everyday, by the scheduled workflow (https://github.com/sagemath/sage-binder-env/tree/master/.github/workflows).

The deployed live doc uses the dev branch and runs on the latest dev version of Sage. I plan to use the live doc in the documentation link in our github wiki.

@mkoeppe
Copy link
Contributor

mkoeppe commented Nov 4, 2023

Thanks. Would this be a good moment to revisit:

@kwankyu
Copy link
Collaborator Author

kwankyu commented Nov 4, 2023

You mean including sage version in NETLIFY_ALIAS so that the url of the deployed doc include the version number?

That has one problem. Currently the url of the deployed doc for beta releases does not change and we are relying on the fact in the doc links in the github wiki. A solution would be to deploy the doc twice: once with say deploy-release-10.2.beta9--... and once with say deploy-release-latest--...

I am not sure if this is a good time to revisit #33862 here. As doc build workflows are now touched by a few PRs, I think it is wise to postpone further touch to them.

Copy link
Contributor

@mkoeppe mkoeppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@kwankyu
Copy link
Collaborator Author

kwankyu commented Nov 4, 2023

Thank you!

Copy link

github-actions bot commented Nov 5, 2023

Documentation preview for this PR (built with commit 9ce90a0; changes) is ready! 🎉

vbraun pushed a commit to vbraun/sage that referenced this pull request Nov 5, 2023
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

Live doc is built separately from the usual doc preview on push to
`develop`, and deployed to Netlify.

Sample deployment: https://deploy-livedoc--
sagemath.netlify.app/html/en/a_tour_of_sage/

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

- sagemath#36601

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36636
Reported by: Kwankyu Lee
Reviewer(s): Kwankyu Lee, Matthias Köppe
@mkoeppe mkoeppe added this to the sage-10.2 milestone Nov 6, 2023
vbraun pushed a commit to vbraun/sage that referenced this pull request Nov 7, 2023
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

Live doc is built separately from the usual doc preview on push to
`develop`, and deployed to Netlify.

Sample deployment: https://deploy-livedoc--
sagemath.netlify.app/html/en/a_tour_of_sage/

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

- sagemath#36601

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36636
Reported by: Kwankyu Lee
Reviewer(s): Kwankyu Lee, Matthias Köppe
@vbraun vbraun merged commit 07ea7e1 into sagemath:develop Nov 10, 2023
20 checks passed
@kwankyu kwankyu deleted the p/deploy-livedoc branch December 13, 2023 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants