Skip to content

Conversation

@ericpien
Copy link
Contributor

@ericpien ericpien commented Nov 4, 2024

Changes

  • yfinance/doc contains /source with the configuration and the template rsts.
  • Updated README and docstrings

Current Workflow

  • push to dev-documented branch will trigger yfinance/.github/workflows/deploy_doc.yml
  • deploy_doc.yml configured to build the documentation from yfinance/doc and publish the htmls to documentation branch's docs directory.
  • This will update the documentation as set up in the repo's settings/pages.

Relates to #1330

@ericpien ericpien marked this pull request as ready for review November 4, 2024 20:18
    - Initial draft of Sphinx documentation using rst
    - update docstrings
    - add deploy_doc.yml for automated deployment through GitHub Actions
@ValueRaider ValueRaider merged commit e27b90d into ranaroussi:dev-documented Nov 5, 2024
@ValueRaider
Copy link
Collaborator

ValueRaider commented Nov 5, 2024

The action claims success:
https://github.com/ranaroussi/yfinance/actions/runs/11690739308
But link is 404

What is your source set to? yfinance might be the opposite. This is my menu from yfinance-cache:
github-page-source_000

@ericpien
Copy link
Contributor Author

ericpien commented Nov 5, 2024

My setting is the same and set to Deploy from a branch.

I think I found the problem: Apparently the publishing branch has to be created by GitHub Actions, not manually created.

Tested and confirmed as below:

  1. I manually created a branch documentation_manual and pushed to my fork's dev-documentation and published to documentation_manual/docs. This resulted in the same behavior in which only non-html subset of filers were copied.
  2. I did not manually create the branch documentation_generated and pushed again to my fork's dev-documentation and published to documentation_generated/docs. This correctly copied the full repo including the htmls.

Can I submit another PR to this branch and try to publish to a non-existing branch via GitHub Actions?

@ValueRaider
Copy link
Collaborator

Understood. I've reverted documentation and renamed to docs_markdown, so name documentation should be free.

@ericpien
Copy link
Contributor Author

ericpien commented Nov 5, 2024

Thank you. Are you able to re-run https://github.com/ranaroussi/yfinance/actions/runs/11690726258? If not, I can submit a trivial PR targetting dev-documented to retrigger and try to publish to documentation.

@ValueRaider
Copy link
Collaborator

@ericpien
Copy link
Contributor Author

ericpien commented Nov 5, 2024

I tried to replicate it on my end and noticed renaming a branch 1. unpublishes the page and 2. reassigns the deploying branch to the renamed branch so now we need to push to docs_markdown to deploy.

So the workflow requires us to publish to a new branch created by GitHub Actions. But we are unable to assign the deploying branch to this new branch.. Are we absolutely restricted from changing the deploying branch/dir?

image

@ValueRaider
Copy link
Collaborator

Only @ranaroussi can access settings page.

Is an option just dumping the html files into docs folder of deploy branch? Like I did here: https://github.com/ValueRaider/yfinance-cache/blob/5ab1bb4b17df9d134e745fb3fa27123b0f9951e2/make-docs.sh#L33

@ericpien
Copy link
Contributor Author

ericpien commented Nov 6, 2024

Yeah that works. I worked out an example in my fork: Upon push to docs_markdown branch (i.e. merge PR), the htmls are built and committed to docs_markdown branch's /docs directory then the page is deployed.

So based on that, I expect the PR #2115 to do the same for ranaroussi::docs_markdown/docs

I think this is a pretty good alternative since we can push changes to docs_markdown during development, and eventually simply push the new changes from main.

@ericpien
Copy link
Contributor Author

ericpien commented Nov 6, 2024

For continuity, I'll leave the comment here.

Following the PR #2115 to docs_markdown, every file needed was built and uploaded to docs/ but the page build was not triggered in actions.

This is odd as a new commit to the renamed publishing branch (i.e. docs_markdown) should have triggered a new build. I tested this behavior by renaming my fork's publishing branch to docs_markdown_renamed and merging a PR that resulted in automatic rebuild and documentation is available.

@ranaroussi are you able to give us a peek at the settings/pages configuration like below?

image

@ValueRaider
Copy link
Collaborator

While we wait for Ran, for a plan B are you OK with README linking to your fork? Maybe you just need to click sync fork to trigger redeploys.

@ranaroussi
Copy link
Owner

ranaroussi commented Nov 6, 2024

Done.

Thank you all for the great work 🙏

@ValueRaider
Copy link
Collaborator

@ranaroussi Can you post a screenshot of the current settings in Build and deployment?

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.

3 participants