Can someone point me to the instructions for setting up a custom deploy for GitHub pages? (My Google skills are failing me.)
I have a site that needs only one modification when I deploy it on GitHub Pages: I want to replace all occurrences of foo.com
with bar.com
. I know that the first two steps are
At this point, do I need to do anything else? Will adding my own, custom .github directory shadow/overwrite any necessary actions for deploying the web site?
(For those who are curious: I know that I can write a simple Jekyll plug-in to do this; but, I'd rather not add the Jekyl front matter to my files. Plus, Jekyll seems like overkill for the one, simple transformation I need.)
Considering JamesIves/github-pages-deploy-action
can be configured to push your production-ready code into any branch you'd like, an alternative would be for your action to:
steps: - name: Replace
which would replace the text in what was checked outFor the first point, you can use for instance a find-and-replace
action, to find foo.com
and replace it with bar.com
.
Note: since you are using a GitHub Action, you can specify said action as publishing source
You can now deploy to a GitHub Pages site directly from a repository using GitHub Actions, without needing to set up a publishing source.
Using Actions to orchestrate Pages publishing provides many more options for choosing your authoring framework (Next.js, Hugo, Gatsby, Jekyll, NuxtJS or other technologies, and the associated versions thereof) as well as giving you finer control over the publishing process, such as leveraging deployment gates.
We have written several starter workflows for the most common frameworks but also have a “Static“ option if you want to deploy the contents of your repository with no build step.
static.yml
one to include your change)