Code Monkey home page Code Monkey logo

Comments (8)

cderv avatar cderv commented on August 16, 2024 1

Thanks, I'll see how I can automate this so that we have no manual step at all

  • Someone PR adding a url in staging
  • We get a preview of the md file to review
  • We decide to include and then got the new site built + link moved to external.txt

from bookdown.org.

yihui avatar yihui commented on August 16, 2024 1

That's perfect! Thanks a lot!

from bookdown.org.

cderv avatar cderv commented on August 16, 2024
  • Auto generate md and create a PR (#67)
  • Auto build the new website and publish

from bookdown.org.

cderv avatar cderv commented on August 16, 2024

@yihui which version of hugo should we use for this website ?

from bookdown.org.

cderv avatar cderv commented on August 16, 2024

Book will now be built and deploy on each commit to master.
That means when merging the auto PR.

Did you have another trigger in mind or is this ok ?

For now, it installs the latest hugo version. Should we pin the version to install ?

from bookdown.org.

cderv avatar cderv commented on August 16, 2024

About the staging.txt process, What do you do manually ?

It seems nothing - Do I have it correctly ?

  1. When someone makes a PR with staging.txt ad .md file will be created
  2. When we merge it gets included in the file to be built
  3. This file will never be removed or modified because the URL will never be fetched for information again. I say that because it is not (1) part of bookdown.org (2) part of external.txt

Do I get the third point right ?

Looking into that to remove the travis part.

from bookdown.org.

yihui avatar yihui commented on August 16, 2024

@yihui which version of hugo should we use for this website ?

I've been using the latest Hugo version. Please free free to pin it.

About the staging.txt process, What do you do manually ?

I look at the CI output just to verify if the book can be scraped and has the required information (title, author, description, etc). If the output looks good, I merge the PR, move the URL from staging.txt to external.txt, fetch the book, and rebuild the site locally.

from bookdown.org.

cderv avatar cderv commented on August 16, 2024

I added a workflow now to build the md file for a new book added on staging.

  • The user will open a PR with the staging.txt file
  • The workflow will trigger on PR, only those which contains a change to staging.txt. It will:
    • Run create-md.R that knows how to handle staging.txt: It will only process the url in the staging area, and only modify this md files
    • When it is done, the workflow will add the content of staging.txt to external.txt, and remove any content in staging.txt
    • It will the commit and push the change to the PR.
  • We then need to review this

You can see an example in #76. It contains some tests commit but the idea is there and the last changes you see if what we should have after someone open a PR.

The change compare to your workflow is that the .md file is created from the one the url in staging, and not by processing everything again after merging the url into external.txt. Maybe this will impact the book length calculation which depends on others books, but next weekly build will update everything, si.

If I got it wrong I may need to change the order in which things are done. I've done it this way because the trigger is easier: do everything when someone open a PR. I can do more complicated to build the website only after the changes are merged in master or similar.

Is it ok like that ?

I merged the mentioned PR above but I'll take into account your feedback if any.

If this is ok - you can close this issue!

Thanks

from bookdown.org.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.