fastai/fast_template

Issue With Automatic nb & word conversion

hamelsmu opened this issue · 8 comments

@jph00 I found a serious issue with the notebook and word to blog conversion that I didn't notice before.

It turns out that a GitHub Action is also responsible behind the scenes for building your GitHub pages. As a security measure, an event triggered by one GitHub Action cannot trigger another GitHub Action.

This means something other than an Action has to make a commit to the repo to force a fresh page build. This means that after the automated system converts your files for you, you have to make some kind of change in your repo for the build to start.

I have no idea why I did not notice this before, and I am not sure if this is the result of a recent change ( but I couldn't find anything saying it was a recent change ).

The only remedy to this situation is to supply a secret in Actions with a personal access token which can authenticate as a user to make the last commit into the repo. I'm going to formulate a PR for this soon, just wanted to open an issue and let you know about this ASAP

Would that be fixed if instead of committing a _posts post, we'd build the website with jekyll build in the action instead?

jph00 commented

@jph00 I think that is a very good idea, and makes 100% sense.

I really like this approach b/c the second project will allow us to use whatever plugins etc we want and add all kinds of cool stuff

FYI I closed #21 which fixed this issue, in anticipation we might move to a different repo for actions. Feel free to reopen etc. if necessary

jph00 commented

Absolutely, will love to start to work on it whenever you are ready!

Next steps could be: discuss the design of this somewhere perhaps in a google doc etc or we could start building it (or do both at the same time).

Some things we could discuss are:

  • The workflow: ex: do we really want the magic commit message "/sync" to be required to kick off a build? Is it acceptable to trigger a page build on every push?
  • What plugins do we want ( might be good for testing purposes to know )
  • Are there any features that would be particularly useful for fastai students?
  • What CSS to include? Perhaps we drop Primer and use something more lightweight that doesn't clobber other themes. We could, for example, borrow some of the css you are using for the docs sites that allow for the useful things like callouts and such. ( I think it is defined here).
  • Ideas for tests: The only kind of tests I can think of is to kick off a jekyll build (without committing the build) and see if that provides an error - this might help catch errors on PRs to the template.
  • What default theme do you want to use? Minima or something like lanyon ?
  • etc

I suppose the thing we would need to get started is a new repo to send PRs etc. Really excited about this (and about the upcoming course and the book)

Closing this issue b/c moved questions to this fastai - nbdev forum post