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

Update rustdoc workflow to deploy docs with GitHub Actions #358

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from

Conversation

lopopolo
Copy link
Member

Deploy generated Rust API documentation to GitHub Pages using the new GitHub Actions deployment model instead of the gh-pages branch deployment model:

This approach follows the model in the hugo starter workflow:

Most updates in the workflow are to model it after the starter workflow template. There are additional changes to Rust toolchain setup:

  • Enforce nightly toolchain with the RUSTUP_TOOLCHAIN env variable which has high priority per https://rust-lang.github.io/rustup/overrides.html.
  • Remove rustup default nightly command.
  • No longer remove rust-toolchain file since RUSTUP_TOOLCHAIN has higher priority.
  • Print out rustdoc verbose version with rustdoc -Vv.

Because generated docs are no longer stored in git, the workaround to remove docs for large generated Rust sources is no longer required and is removed.

peaceiris/actions-gh-pages is no longer used to deploy the docs.

Deploy generated Rust API documentation to GitHub Pages using the new
GitHub Actions deployment model instead of the `gh-pages` branch
deployment model:

- https://github.blog/2022-08-10-github-pages-now-uses-actions-by-default/
- https://github.blog/changelog/2022-07-27-github-pages-custom-github-actions-workflows-beta/

This approach follows the model in the `hugo` starter workflow:

- https://github.com/actions/starter-workflows/blob/edae9e95bf1c84aff6e1d34afcb7bde9288d0e25/pages/hugo.yml

Most updates in the workflow are to model it after the starter workflow
template. There are additional changes to Rust toolchain setup:

- Enforce nightly toolchain with the `RUSTUP_TOOLCHAIN` env variable
  which has high priority per https://rust-lang.github.io/rustup/overrides.html.
- Remove `rustup default nightly` command.
- No longer remove `rust-toolchain` file since `RUSTUP_TOOLCHAIN` has
  higher priority.
- Print out rustdoc verbose version with `rustdoc -Vv`.

Because generated docs are no longer stored in git, the workaround to
remove docs for large generated Rust sources is no longer required and
is removed.

`peaceiris/actions-gh-pages` is no longer used to deploy the docs.
@lopopolo lopopolo added the A-github Area: GitHub infrastructure as code. label Aug 30, 2022
@lopopolo
Copy link
Member Author

I don't like how the deploy step shows up as a skipped job. closing this to find another approach.

I think I'll merge the docs compile checks into the CI workflow and simplify the rustdoc workflow so it only runs on trunk.

@lopopolo lopopolo added S-wip Status: This pull request is a work in progress. S-blocked Status: Marked as blocked ❌ on something else such as other implementation work. labels Aug 30, 2022
@lopopolo
Copy link
Member Author

@lopopolo
Copy link
Member Author

This feature landed in the GitHub terraform provider: integrations/terraform-provider-github#1663

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-github Area: GitHub infrastructure as code. A-github-actions Area: GitHub Actions workflows and automation. S-blocked Status: Marked as blocked ❌ on something else such as other implementation work. S-wip Status: This pull request is a work in progress.
Development

Successfully merging this pull request may close these issues.

1 participant