Skip to content
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 preview site build script and GitHub Actions workflow #748

Merged
merged 3 commits into from
Jul 23, 2023

Conversation

avaris
Copy link
Member

@avaris avaris commented May 9, 2023

Added a script for generating theme previews and a actions workflow for publishing the generated preview site under github pages for this repo. I have configured the repo settings. Once this is merged and workflow runs, it should be available under https://getpelican.github.io/pelican-themes . Workflow is configured for pushes on master or manual runs (if necessary).

Example site is currently available at my fork: https://avaris.github.io/pelican-themes/

Heavily based on the work by @maphew, thanks!

Fixes #731, Fixes #740
(kind of... redirection for pelicanthemes.com will be required)

@justinmayer justinmayer changed the title add preview site build script and github actions workflow Add preview site build script and GitHub Actions workflow May 10, 2023
@justinmayer
Copy link
Member

@avaris: If we were to use the pelicanthemes.com domain instead of getpelican.github.io, what do you think would be the best way to handle that? I have a web server we can use for that purpose — we would just need to use rsync or something similar to transfer the generated files. Perhaps something like what is described in the following article would do the trick? What do you think?

Deploying to a server via SSH and Rsync in a Github Action

@jaideep2
Copy link

@justinmayer we could also connect pelicanthemes.com to the static output of the action workflow and serve it via github pages https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site

@justinmayer
Copy link
Member

I forgot that GitHub Pages can be used with custom domains. That is indeed an alternative to using Rsync and our own web server, although it would sacrifice some flexibility (e.g., adding re-directs for old URLs to current URLs, etc.).

@avaris
Copy link
Member Author

avaris commented Jul 21, 2023

I imagined serving will be done on github.io and pelicanthemes.com could simply redirect to it for simplicity. If you prefer a custom server, yes, rsync after generation would likely do the trick.

@justinmayer
Copy link
Member

Via fa82822 I added a block to the CI workflow that (should) also transmit the generated preview site assets to the server hosting the pelicanthemes.com domain. This way we can experiment with both options and decide which one works best.

@justinmayer
Copy link
Member

Let's merge this and see what happens. Many thanks to @maphew and @avaris for working on this!

@justinmayer justinmayer merged commit d87372a into getpelican:master Jul 23, 2023
@justinmayer
Copy link
Member

It appears that this endeavor was successful, with the contents visible on both domains listed above. 🎊

Now to decide which domain to keep and which to retire. 😉

@avaris avaris deleted the preview-site branch July 25, 2023 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alternate themes preview using Github Pages pelicanthemes.com website throwing 500s
3 participants