Comments (8)
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.
That's perfect! Thanks a lot!
from bookdown.org.
- Auto generate md and create a PR (#67)
- Auto build the new website and publish
from bookdown.org.
@yihui which version of hugo should we use for this website ?
from bookdown.org.
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.
About the staging.txt
process, What do you do manually ?
It seems nothing - Do I have it correctly ?
- When someone makes a PR with staging.txt ad .md file will be created
- When we merge it gets included in the file to be built
- 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 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.
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 handlestaging.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
toexternal.txt
, and remove any content instaging.txt
- It will the commit and push the change to the PR.
- Run
- 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)
- Issue with weekly build and curl package installation HOT 1
- Add R Developer’s Guide if not present
- Update process regarding new bookdown template
- Remove more demo book
- Fix workflow to update site HOT 6
- Broken link in about page HOT 1
- Commit after unstaging a new book does not trigger rebuild
- Add R Development Guide HOT 6
- Pin tidy finance book on homepage
- Please remove these two book entries
- Update GHA workflow to remove warnings
- Add new book on R Torch HOT 2
- Build error : Failed to retrieve package sources for MASS 7.3-60.0.1 from CRAN HOT 2
- Accommodate to bs4_book HOT 9
- When description contains emoji the tags are not correctly matched
- Fix issue with the auto PR creation HOT 1
- Modify staging workflow to work with fork HOT 7
- Change pins code when pins 1.0.0 will be out. HOT 1
- Build error : Failed to retrieve package sources HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bookdown.org.