-
Notifications
You must be signed in to change notification settings - Fork 36
Adding mdbook support/CI for PRs #7
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
Conversation
Is this based on equivalent code for the rustc-dev-guide? Ideally we'd keep the infra code in sync somehow... |
I think the rustc dev guide is using Travis CI for its mdbook support. Was there a reason not to use Actions on that side too? |
Not sure, but I think we're going to try to switch to Actions. And new stuff is being put on Actions: rust-lang/rustc-dev-guide#1037 |
IIRC third-party actions shouldn't be used generally for security reasons (I think @pietroalbini has some thoughts about it).
It's just not updated yet, we have rust-lang/rustc-dev-guide#940 but it isn't done. |
Is this just for third-party actions that we pass secrets into? Or can any third-party action access secrets without us explicitly passing them through? I'd be interested to hear more about that. |
Given rust-lang/crates.io#2951 (comment) I think we should avoid using them regardless of secrets. |
Thanks @JohnTitor, that seems fair to me. @simonsan Maybe we could look at what it would take to inline the pieces of these actions we actually use? If we want to move the Rustc guide to Actions too at some point it seems like we may as well try get something working with it here too, then look at making things consistent. |
For the "setup mdBook" part I would think you could just copy the commands that are run in Travis from the rustc-dev-guide since they're just shell commands. Not sure about the deploy; you might want to look through the |
I imagine the deploy would be the usual dance of creating an empty Git repository, copying the HTML content into it and force pushing that to the |
I think the rustc-dev-guide actually just force-pushes to a branch called I think this is the responsible CI code: I don't know Travis though, so I can't explain it :) |
These scripts in
Would you also not consider using this and instead use the script? MDL is easy to setup with a Same for markdown link check:
These actions shouldn't modify anything and push something to branches and mostly run during a PR, so I'm not sure whether there should be any security concerns about it, while I understand these for mdbook actions and deployment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @simonsan! Once we update the variables this looks good to me.
@KodrAus Should I remove the |
@KodrAus I've added mdbook build/test to test the building process of the book and the code samples during PR. Do you think that makes sense? I have prepared fixes for the files already so |
Thanks @simonsan! I merged in your fixes. Removing the |
remove empty lines in book.toml
Done :) |
Thanks so much for working on this @simonsan! 🙇 |
generated from commit c40be4b
@KodrAus Seems there is still an issue with that CNAME. Anything to fix from my side? |
Fixes #6
Output: https://simonsan.github.io/std-dev-guide/
@KodrAus Feedback welcome :)