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

ci: Add preview cookbook workflow #29

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

storopoli
Copy link
Contributor

@storopoli storopoli commented May 4, 2024

Add a new workflow file to enable previewing the cookbook.

The main advantage here is that in order to review new contributor,
the reviewer do not need to run the code locally to render the mdbook output.
This is useful since not only simplifies the review workflow,
but also diminishes the effort that it takes for someone to review
a contribution; hence opening opportunities for new reviewers to join in.

This workflow runs on pull requests and
creates a preview of the cookbook using mdBook.

The preview is then uploaded as an artifact.

It might be useful to preview a rendered version
of the cookbook.

@storopoli storopoli force-pushed the ci/preview-builds branch 2 times, most recently from 52c2047 to 8277d3c Compare May 4, 2024 08:49
@storopoli
Copy link
Contributor Author

It works, check the artifact in https://github.com/rust-bitcoin/rust-bitcoin.github.io/actions/runs/8949344061 (expires in 8 days from 2024-05-04T08:50 UTC)

@apoelstra
Copy link
Member

Are you able to put the zip contents inside an inner directory, so that when you unzip it, it doesn't dump files all over the current directory?

Otherwise I think this is a pretty good idea!

@storopoli
Copy link
Contributor Author

Are you able to put the zip contents inside an inner directory, so that when you unzip it, it doesn't dump files all over the current directory?

I never considered that, since both in my Macbook and Linux Desktop it unzips into a new directory and do not dump the files in the current dir:
image

Are you unzipping in the terminal?

@apoelstra
Copy link
Member

Are you unzipping in the terminal?

Yes. I don't have any GUI zip utility that I'm aware of.

@apoelstra
Copy link
Member

Oh, neat, I can run unzip -dtmp and it'll create a directory called tmp/ and unzip into that. I should be using that always I guess.

But I still think that it's good hygeine to zip up files that already live in their own directory.

@tcharding
Copy link
Member

tcharding commented May 4, 2024

Are you unzipping in the terminal?

Yes. I don't have any GUI zip utility that I'm aware of.

Lol, I assumed he was winding you up :)

unzip -dtmp

TIL, I always move to tmp/ manually, this is sweet.

@storopoli
Copy link
Contributor Author

ping @tcharding

Copy link
Member

@tcharding tcharding left a comment

Choose a reason for hiding this comment

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

ACK 3b29f5e

@tcharding
Copy link
Member

I missed the force push two weeks ago. Feel free to ping me if something sits for even a few days, usually if I missed it for 3 days then I missed it totally - no benefit waiting any longer.

@tcharding
Copy link
Member

Will wait for @apoelstra to ack because of the zip talk above, then I'll merge.

@apoelstra
Copy link
Member

3b29f5e has trailing whitespace in two places.

Otherwise it's good -- I don't mind the zip thing since I learned the -dtmp trick.

Add a new workflow file to enable previewing the cookbook.

This workflow runs on pull requests and
creates a preview of the cookbook using mdBook.

The preview is then uploaded as an artifact
and a comment is created in the pull request
to notify users.
@storopoli
Copy link
Contributor Author

Rebased and removed the trailing whitespaces (also added 2 coins to the trailing whitespace jar)...

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK a755900

@storopoli
Copy link
Contributor Author

One week has passed. Can we merge this?

@apoelstra apoelstra merged commit d2b7067 into rust-bitcoin:master Jun 3, 2024
3 checks passed
@storopoli storopoli deleted the ci/preview-builds branch June 3, 2024 15:40
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.

None yet

3 participants