-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GitHub Actions workflow for GitHub Pages #3189
Add GitHub Actions workflow for GitHub Pages #3189
Conversation
@@ -0,0 +1,64 @@ | |||
name: Deploy to GitHub Pages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub themselves provide starter workflows for publishing to GitHub Pages using various static site generators (unfortunately not including Pelican), the way I've designed this workflow is similar to these: https://github.com/actions/starter-workflows/tree/main/pages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how I feel about hosting a workflow file under .github/workflows
that is not used in this repository, just to make it reusable. I'm just saying this before I start reviewing, which will have to wait for some free time for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reusable workflows have to be under .github/workflows/
otherwise GitHub won't recognise them. Unfortunately they can't be in a subdirectory of .github/workflows/
either (docs).
It could be moved into a .github/workflows/
directory of a separate getpelican/workflows
repo, but the nice thing about having the workflow be in the getpelican/pelican
repo itself is that you can change the workflow and its associated documentation at the same time, in one PR. So we might want to move the workflow's documentation into the README.md
of the new workflows
repo as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how I feel about hosting a workflow file under
.github/workflows
that is not used in this repository, just to make it reusable. I'm just saying this before I start reviewing, which will have to wait for some free time for me.
That is a valid point. On the other side, I think it would be good to have (even if I don't use it). Many projects on GH just use a different approach: They create a dedicated repo for that action in same org.
One could do the same and have the minimal documentation as a pelican site deployed as github page from that said repo.
Benefits:
- this repo is not cluttered with unused code
- the action is tested and used with it's own documentation
Con:
- another repo to maintain
When I have a bit more time I can update my demo site to use the |
Change to using the GitHub Actions reusable workflow from getpelican/pelican#3189
Add a GitHub Actions workflow that users can use to publish their Pelican sites to GitHub Pages by running `pelican` on GitHub Actions, without having to run `pelican` locally and push the output directory to a branch. See: getpelican#3174
1bd64fd
to
29185e4
Compare
@avaris I've done a bit more work on this and it's ready for review now:
I've also changed https://github.com/seanh/pelican-github-pages-demo/ to use the workflow from this PR, so see that repo for a working example |
Thanks @seanh, I will certainly take a look when my schedule permits, but it's very unlikely for the next couple weeks :(. |
Hey, no worries 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the additional documentation. Good to merge, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a GitHub Actions workflow that users can use to publish their Pelican sites to GitHub Pages by running
pelican
on GitHub Actions, without having to runpelican
locally or push the output directory to a branch. See: #3174 for some discussion.