Cookbook Refresh (infra)

I'm working on getting the Rust Cookbook updated but struggling with deployment. https://github.com/rust-lang-nursery/rust-cookbook/deployments/github-pages last deployed in 2021 and I'm trying to get the changes that have been merged recently deployed. I updated the error handling to reference anyhow and thiserror and merged 20 stale PRs. I'd like to refresh this resource for the 2024 edition. Is travis the right place to check?

2 Likes

Kinda. It's ci/deploy.sh that does the deployment of the GH Pages by pushing the compiled mdbook to the gh-pages branch. GH Pages should be configured to deploy from that branch in the settings/pages of your project.

Are you the original author of that book?

Of course it is a great work. But for me, when I started with Rust a year ago, some pages lead to a lot of confusion, so I stopped reading it. I think one example was Sort a Vector - Rust Cookbook. For first example, sorting integers, it makes really not much sense talking about "but does not preserve the order. And next example, sorting floats. Why a different strategy this time? Of course, I know the answer. But my assumption was, that the book should help people without decades of experience in programming? Sorry, I am sure the book will contain other chapters that are indeed very helpful.

Alright. I'll run the deploy as if I were Travis.

I wrote a few examples. I was learning rust by contributing to the Lib Blitz. I didn't pick what made it in the cookbook, Mozilla did.

I need rust-lang-nursery member to re-add gh-pages as the deployment target. While I was troubleshooting push errors, I ended up taking down the book, and I don't have the settings that Jofas refers. I can push again to gh-pages branch, but it doesn't trigger the deploy and I see a 404 :person_facepalming:

I think your commit wasn't deployed because you don't have admin access to the repo:

If you are publishing from a branch and your site has not published automatically, make sure someone with admin permissions and a verified email address has pushed to the publishing source.

I was able to deploy once, and it was not just the book folder, so when I tried to fix it in a panic, I troubleshooted by removing the gh-pages branch to push. Turns out I needed to change my git config see SO. The last push is the email of the cookbook like the deployment script which is the one that didn't work, and I think an admin needs to ensure the removal of gh-pages didn't reset the config.