mage-os / devdocs

Mage-OS devdocs
14 stars 23 forks source link

Preview Environment #35

Open DavidLambauer opened 1 year ago

DavidLambauer commented 1 year ago

Reviewer should be able to get a Preview Environment

Morgy93 commented 1 year ago

What about using https://docs.github.com/pages ?

DavidLambauer commented 1 year ago

GitHub Pages only works with Jekyll. We don't use Jekyll

Morgy93 commented 1 year ago

GitHub Pages only works with Jekyll. We don't use Jekyll

That's not the information I am having currently:

We recommend using Jekyll with GitHub Pages. If you prefer, you can use other static site generators or customize your own build process locally or on another server. For more information, see "About GitHub Pages."

Source: https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll#about-jekyll

In the end you just need to serve the static documentation page from the markdown file that has been changed in the PR. I assume that could be handled with GitHub Actions all alone.

DavidLambauer commented 1 year ago

While it might be possible to use GitHub Pages, I don't see it happening. We wouldn't edit our application code to use GitHub Action aka. a Static Site.

The simplest way is most likely to duplicate the deployment and create a second instance on our current server. This wouldn't fulfill the purpose of a temporary review env. So maybe we can set up something with Gitpod or similar.

sprankhub commented 1 year ago

If I understand it correctly, the issue is that GitHub Pages still requires a static site, whereas the devdocs are currently a dynamic PHP-based site.

DavidLambauer commented 1 year ago

That's what I'm trying to say, yes

Morgy93 commented 1 year ago

If I understand it correctly, the issue is that GitHub Pages still requires a static site, whereas the devdocs are currently a dynamic PHP-based site.

True, but for the markdown review process you only need the static content of the page that has been modified.

Let's say that the markdown for https://devdocs.mage-os.org/docs/main/rest-apis has been changed. Then you only need to build that specific page, scrape its source code, and publish a single html document of it. If multiple markdowns have changed, you do that for multiple pages. But in the end, you only need some pure html file (for review), because on the docs page itself there is no fancy magic happening. It's just some text and colors. 😅

DavidLambauer commented 1 year ago

We have a few custom markdown extensions that'll render special markup. Info boxes, toc, mentions and more are coming. And again, I don't want to add code to the application that solves an infrastructure problem.

Morgy93 commented 1 year ago

We have a few custom markdown extensions that'll render special markup. Info boxes, toc, mentions and more are coming.

And in the end, it's pure static html, css & maybe js.

And again, I don't want to add code to the application that solves an infrastructure problem.

Fair enough. Sadly, the community won't be able to contribute because of the lack of access to the infrastructure.

Will leave it to it then. Hope to see the feature soon. 😊