-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: add publish pypi workflow #19
feat: add publish pypi workflow #19
Conversation
push: | ||
branches: | ||
- main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
push: | |
branches: | |
- main |
@Revathyvenugopal162 if this is a push to pypi only workflow, then i think we can remove the trigger on push to main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, i adapted this from the https://github.com/pyOpenSci/pyosMeta/blob/main/.github/workflows/publish-pypi.yml, i can revert when pushing with a tag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i am sorry - you ar e right
if: github.event_name == 'release'
that ensures it only publishes to pypi on a release.
# This ensures that the publish action only runs in the main repository | ||
# rather than forks | ||
# Environment is encouraged so adding | ||
environment: build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just created this build environment on PyPI. We will need to run a release when this is merged to test it and grab the name pyos-sphinx-theme
# Only publish to real PyPI on release | ||
if: github.event_name == 'release' | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
sign-files: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Revathyvenugopal162 this is great. Please note that I didn't set up the sigstore signing in the other repo. I'm unfamiliar with this step. We can see if it works; perhaps you know much more than I do. But I can't review it as I don't know enough!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As i commented above , i adapted this from https://github.com/pyOpenSci/pyosMeta/blob/main/.github/workflows/publish-pypi.yml. may be i can investigate about this a little
@@ -112,6 +119,7 @@ def setup(app): | |||
app.add_html_theme("pyos_sphinx_theme", THEME_PATH) | |||
app.config.html_favicon = "https://www.pyopensci.org/images/favicon.ico" | |||
app.connect("builder-inited", update_config) | |||
app.config.templates_path.append(str(TEMPLATE_PATH)) | |||
# app.connect("html-page-context", redirect_from_html_to_dirhtml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the matomo analytics and css files be added later? or is this old code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the matomo analytics and css files be added later? or is this old code?
no i didn't added it yet. Since i am unfamiliar with that script, i thought, we will do the first release and slowly migrate all those, addition js and css and do patch release in a regular manner if its ok for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Revathyvenugopal162 i'm sorry i am so slow to reply here. yes let's move forward with a release! we can add that later.
@@ -6,3 +6,5 @@ stylesheet = styles/pyos-sphinx-theme.css | |||
|
|||
# Myst syntax extensions | |||
myst_enable_extensions = ["colon_fence",] | |||
footer_start = code_of_conduct, copyright |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding this!! This is great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Revathyvenugopal162 this looks wonderful. i left a few questions. but we could also just merge as is with the small edits that i made see how the build works if you want. then we could open another small pr in case the analytics js and css aren't included (that commented out code in the init file seemed to include those two things). Again you know a lot more than I do about these themes so I will follow your lead!
this is approved
Co-authored-by: Leah Wasser <[email protected]>
I am slowing this down. Let's merge this and test out a release. |
No description provided.