How to deploy a Pelican site to GitHub Pages directly, by using GitHub Actions #3174
Replies: 2 comments 2 replies
-
Thanks for sharing this. Have you written an article on how to publish a Pelican blog using your Github action? |
Beta Was this translation helpful? Give feedback.
-
You're welcome!
I haven't written a separate article but the I'm thinking I could send a PR to move the reusable workflow into https://github.com/getpelican/pelican/tree/master/.github/workflows and to update https://github.com/getpelican/pelican/blob/master/docs/tips.rst#publishing-to-github adding the reusable workflow as an alternative way to publish to GitHub Pages alongside the "classic" way that's already documented there. If that sounds good to you I'll send a PR |
Beta Was this translation helpful? Give feedback.
-
The classic way to deploy a Pelican site to GitHub Pages is to run Pelican locally and commit the contents of the locally-built
output/
directory to your GitHub repo'sgh-pages
branch.Since July 2022 it's also been possible to get GitHub Actions to automatically build your site with Pelican and publish it to GitHub Pages each time a commit is pushed to the
main
branch. No need to run Pelican locally! You can even edit yourcontent/
files using GitHub's web interface and the changes will be automatically deployed!Not sure if anyone's doing this with Pelican already, but I've written a reusable GitHub Actions workflow that people can use (or copy-paste from) if they want to do this: https://github.com/seanh/pelican-github-pages
Any interest in integrating this into Pelican's publishing to GitHub docs?
Beta Was this translation helpful? Give feedback.
All reactions