Closed MrDesjardins closed 4 months ago
@MrDesjardins can you try using the official github actions for publishing to pages? You need these two:
https://github.com/actions/upload-pages-artifact
https://github.com/actions/deploy-pages
Also update your node step to use latest node action v4.
I'll take a closer look at this this week.
I plan to migrate from actions/checkout@v3
in the future as it looks like GitHub is now providing an alternative. I decided to move on with remarkGfm
and rehypePrism
which does not behave differently from local or GitHub action.
Thanks for the suggestion, I'll take a closer look soon.
I am using
rehypePrettyCode
in a NextJS server-side generated website (static assets) that is hosted on Github page. In a development environmentnext dev
or when the generated assets are served locallynpx build && npx serve@latest out
the code highlight works well. Very easy to configure and use.However, the same code in Github action compiles and deploys without a warning/error message but the end result is different.
Locally, the output looks like what I expect:
However, the code deployed by Github action looks like this:
As we can see the
style
is missing and lines are not broken by tokens.I've tried to run dev/build in WSL and on a MacOS. Both work well, it's really on Github page that it does not work out.
The configuration:
Full source code is available on Github.
I'll try to do a small repo but what is hard to repro is that it works running the dev command or even the build + serve the static file locally 🤔