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 GitHub action that publishes updated website when pushing to each pull request #102

Open
teodutu opened this issue Jan 13, 2023 · 4 comments
Labels
area/infra Update to infrastructure / scripts kind/new New content / item

Comments

@teodutu
Copy link
Member

teodutu commented Jan 13, 2023

Building the website locally is tedious, takes a very long time, and 20GB+ of disk space. This makes it difficult to test changes to the documentation.

The solution is to add a GitHub action triggered by a new commit to a PR that runs the builder, publishes the rendered content, and then adds a comment to the PR containing a link to the published website that contains the changes within the PR. You can draw inspiration from the GitHub action used by the OS Internals class. An example of a comment created by this action is linux-kernel-labs/linux#316 (comment).

Ideally, this action would only be triggered by changes to the Markdown documentation or quizzes and not just code. For this, PRs should first be labelled automatically as per #89. According to this issue, the action should only be executed when the area/documentation label is present.

@teodutu teodutu added area/infra Update to infrastructure / scripts kind/new New content / item labels Jan 13, 2023
@teodutu teodutu added this to the SO 2022-2023 sem 1 milestone Jan 13, 2023
@razvand
Copy link
Contributor

razvand commented Jan 13, 2023

20GB+ of space? Are you sure? It didn't take that much on my side:

$ docker image ls
[...]
operating-systems-oer/docusaurus             latest          ba0f68a891a8   9 hours ago    1.27GB
[...]
ghcr.io/open-education-hub/openedu_builder   0.3.1           cadf3526a0e9   2 months ago   130MB
[...]

@teodutu
Copy link
Member Author

teodutu commented Jan 13, 2023

20GB+ of space? Are you sure? It didn't take that much on my side:

I'm not sure why. Perhaps some of it is boilerplate files or something. What's certain is that the size of /var/lib/docker/overlay2 increased by 20GB+ when running the builder locally as described in https://github.com/open-education-hub/oer-template#running-locally.

@gabrielmocanu
Copy link
Contributor

I don't have this issue related to disk space, but indeed building website locally is tedious.
After following all the steps from oer-template. This is what I got.
This needs to be solved first, at least to be able to build it locally.

image

@teodutu
Copy link
Member Author

teodutu commented Feb 3, 2023

Change the name of the output/ directory to operating-systems/ and start the python3 server one level above this folder. Then it will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/infra Update to infrastructure / scripts kind/new New content / item
Projects
None yet
Development

No branches or pull requests

3 participants