Тёмный

Publish a Quarto project using GitHub Pages+GitHub Actions in 6 minutes (no need to render locally!) 

Melissa Van Bussel (ggnot2)
Подписаться 3,9 тыс.
Просмотров 3,9 тыс.
50% 1

In this video, we learn how to publish a Quarto project using GitHub Pages AND GitHub Actions, in a way that avoids the need to render any files locally. GitHub Actions handles the whole process from start to finish: Quarto + R will be installed, the correct versions of each R package you need will be installed, the Quarto project will be fully rendered, and then it'll be published on GitHub Pages. It's all free, and it only takes a few minutes to set up.
It's also surprisingly much easier than I thought it would be:
✅ Step 1 - Create a new Quarto project that uses Git and renv
✅ Step 2 - Add a .github/workflows/publish.yml file (there's a template!)
✅ Step 3 - Push everything to GitHub, and change which branch GitHub Pages is being built from
Link to publish.yml template: quarto.org/docs/publishing/gi...
Want to support my channel or connect?
☕Buy me a coffee: ko-fi.com/melissavanbussel
💼 LinkedIn: / melissavanbussel
🐦 Twitter: / melvanbussel
🌐 Website: www.melissavanbussel.com/
💻 GitHub: github.com/melissavanbussel
*Please note: it’s helpful for me if you send me a message on LinkedIn when you add me letting me know you’re adding me because of RU-vid, so that I can keep track of how I know each person in my network😊
00:00 - Introduction
00:59 - Creating a Quarto Project
03:58 - Creating the .github/workflows/publish.yml file
05:16 - Configuring GitHub Pages

Опубликовано:

 

15 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 29   
@Aaqib..
@Aaqib.. 5 месяцев назад
😮excited to try it out, thanks
@koushik7604
@koushik7604 3 месяца назад
This is something I was looking for. Thanks a lot Melissa.
@muhammetmelikkolgesiz9252
@muhammetmelikkolgesiz9252 2 месяца назад
Worked like a charm. Thank you for your clear instructions!
@kyleGrealis
@kyleGrealis 5 месяцев назад
What a fantastic explanation, Melissa! Great job and now I feel inspired enough to make my own :)
@ggnot2
@ggnot2 5 месяцев назад
Thanks, Kyle! You totally should -- send me a link if you end up making one, I'd be interested to check it out :)
5 месяцев назад
This is really useful, now it's time to move from rmakrdown to Quarto. Great!
@ggnot2
@ggnot2 5 месяцев назад
Quarto is definitely worth the switch!
@hoschie211
@hoschie211 5 месяцев назад
That was amazing 🙂
@ggnot2
@ggnot2 5 месяцев назад
Thanks so much for watching!
@gooseberrylay
@gooseberrylay Месяц назад
I had some errors that mentioned something about a "lock file". The page with the yaml code (used in the video) says that you should run "quarto publish gh-pages", once, to be able to use github actions. I did that and got it to work. Thanks for the great video!
@indemonic
@indemonic 2 месяца назад
Excellent video Melissa! It was clear and effective. Do you know if there are some templates (or knowing examples) that a new user could use to start with his new Github page with Quarto? Thank you so much again!
@user-rx8ex2fi8j
@user-rx8ex2fi8j 5 месяцев назад
Great video! Could you explain why you need to create a branch for creating a website? What will be the difference if you directly put the .yml in the master? Thanks
@gecarter53
@gecarter53 5 месяцев назад
Great video! Who knew it could be this simple. Can you mention any limitations as compared to creating a Shiny website?
@mikegaunt837
@mikegaunt837 5 месяцев назад
Shiny can be overkill for many applications - you can get pretty good interactivity using plotly, leaflet, crosstalk, DT, reactable, etc without having to also develop additional Shiny specific code (observe, reactive, UI/Server mumbo jumbo) as you would with a Shiny application. In addition, making Quarto/RMarkdown/HTML documents are easy to develop (for reason given above) and can be turned into a Shiny document once features have been mostly put together or approved (as in by a client). These documents can be shared locally to anyone that has access to a browser to open up HTML files or can be hosted freely. TLDR; Shiny can be overkill for a lot of reasons.
@user-ng1rf5nv2d
@user-ng1rf5nv2d 4 месяца назад
This was a great tutorial! I got my site up in no time. Question regarding your workflow following this initial set up: when I'm developing new code to publish, do I do it on the main or gh-pages branch or some other branch? And do I put the _project.yml file on both branches or just the main? Thank you.
@user-ng1rf5nv2d
@user-ng1rf5nv2d 4 месяца назад
(main)
@ggnot2
@ggnot2 3 месяца назад
@@user-ng1rf5nv2d Great question! I'm sure there are many ways to make things work, but I've continued to only make changes to my main branch and it's updated the public-facing site no problem, so that's one workflow that works :)
@phdpablo2819
@phdpablo2819 23 дня назад
Ok, but isn't recommended check if everthing its right localy before I started a lot of wrong commits?
@tomaszklimanek6662
@tomaszklimanek6662 5 месяцев назад
Great!!! Thank you! Do you have any experience in publishing quarto book or website on GitLab pages ? I saw your video with quarto presentation published on Gitlab pages but I guess in case of quarto book it would be not the same approach.
@ggnot2
@ggnot2 5 месяцев назад
I do, yes! The process for a quarto book using GitLab Pages is very similar to the process for revealjs. Really it would only change a line or two in the .gitlab-ci.yml file -- I'm pretty sure it's as easy as removing lines 7 and 8 from the file here: gitlab.com/melissavanbussel/example-slides/-/blob/main/.gitlab-ci.yml?ref_type=heads (If you end up trying it and that doesn't work, send me a link to the repo and I can take a look, or I can make a cloneable template)
@tomaszklimanek6662
@tomaszklimanek6662 5 месяцев назад
It was that simple! 😄Thank you Melissa! I work for Statistics Poland and found your videos very inspiring. We are working on a kind of a guide on SDC methods and I prefer GitLab as it seems to give more possibilities to create webpages with access limited only to team members.
@ggnot2
@ggnot2 5 месяцев назад
@@tomaszklimanek6662 That's really cool! GitHub seems to be more commonly used, but I prefer the flexibility of GitLab as well :)
@samritpramanik2962
@samritpramanik2962 5 месяцев назад
Will it work for already published quarto website to some host other than github page (e.g. netlify) ??
@ggnot2
@ggnot2 5 месяцев назад
Hmm, I haven't tried with netlify. Jadey Ryan has a really great blog post though on using Netlify + Quarto + GitHub: jadeyryan.com/blog/2023-11-19_publish-quarto-website/
@datawithrama1211
@datawithrama1211 4 месяца назад
Hi Melissa! that was simple yet astonishing tutorials. Bu I have a question. In your publish.yml file, it is written that the branch is "main". However, your github pages settings, the branch is "gh-page". Can you give us an explanation for that? How can it be different? Thank you!
@ggnot2
@ggnot2 4 месяца назад
That's a great question! I don't believe it's technically required, but more of a best practice since it's the standard / conventional way of doing things, which makes it easier for other people to use your code and understand your repo. Since it's the standard, it also is likely slightly easier since this is the default that you're going to see in most tutorials and templates. I don't think there's theoretically anything stopping you from manually editing the publish.yml file, though, and changing this default behaviour to publish the site from a different branch. With all that being said, I haven't actually tried that myself - this is just based on my best guess based on how CI/CD works on GitLab (which I have more experience with)
@radioncreation
@radioncreation 3 месяца назад
Hi Melissa, with this way of publishing I face the issue of not being able to publish code blocks. All github action jobs are failing any idea what is wrong? Sth missing in publish.yml?
@radioncreation
@radioncreation 3 месяца назад
I mean code execution blocks not just simple code blocks. Simple code blocks are not formatted properly, and execution code blocks can not be deployed with the github action way of publishing.
Далее
How GitHub Actions 10x my productivity
8:18
Просмотров 396 тыс.
Quarto Dashboards | Charles Teague | Posit
12:16
Просмотров 19 тыс.
The cloud is over-engineered and overpriced (no music)
14:39
Git MERGE vs REBASE: The Definitive Guide
9:39
Просмотров 91 тыс.