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 documentation publishing workflow to standalone repo #5081

Merged
merged 3 commits into from
Jul 16, 2024

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Jul 15, 2024

Summary

This approach is based on https://github.com/PrefectHQ/docs. Rather than publishing docs in the uv repo, we push to an independent repo that's used solely to house the docs. In Prefect's case, this allows them to publish versioned documentation (we should do that too). For us, though, the benefit is that we can publish the Ruff and uv docs as a single site (docs.astral.sh).

Prefect clones the source repo and builds the documentation from the docs repo (i.e., the action runs in the docs repo). In our case, I've instead set it up such that the action runs in uv (and later in ruff too), clones the docs repo, and puts up a PR in that separate repo. Because of these requirements, we have to use a PAT rather than a deploy key (as PATs cannot do GitHub-specific things like create PRs -- they can only operate over the Git CLI).

See: astral-sh/docs#2.

@charliermarsh
Copy link
Member Author

This will take me 1,000 attempts to get working.

@charliermarsh charliermarsh force-pushed the charlie/docs-repo branch 15 times, most recently from cf553c0 to 079654b Compare July 15, 2024 21:43
@charliermarsh charliermarsh requested a review from zanieb July 15, 2024 21:44
@charliermarsh charliermarsh added documentation Improvements or additions to documentation internal A refactor or improvement that is not user-facing labels Jul 15, 2024
@charliermarsh charliermarsh marked this pull request as ready for review July 15, 2024 21:45
@charliermarsh charliermarsh changed the base branch from main to charlie/docs-base July 15, 2024 21:46
@charliermarsh charliermarsh force-pushed the charlie/docs-base branch 3 times, most recently from e61ae8f to cebbeab Compare July 15, 2024 22:14
Base automatically changed from charlie/docs-base to main July 15, 2024 22:22
@charliermarsh charliermarsh force-pushed the charlie/docs-repo branch 2 times, most recently from 0c15a46 to ca17064 Compare July 15, 2024 23:57
@charliermarsh charliermarsh requested a review from zanieb July 15, 2024 23:59
@charliermarsh
Copy link
Member Author

Thanks @zanieb!

Copy link
Member

@zanieb zanieb left a comment

Choose a reason for hiding this comment

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

Awesome :)

@charliermarsh charliermarsh enabled auto-merge (squash) July 16, 2024 13:04
@charliermarsh charliermarsh merged commit 0e7df96 into main Jul 16, 2024
51 checks passed
@charliermarsh charliermarsh deleted the charlie/docs-repo branch July 16, 2024 13:14
dhruvmanila pushed a commit to astral-sh/ruff that referenced this pull request Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation internal A refactor or improvement that is not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants