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

How to run the website demo locally? #1945

Open
not-my-profile opened this issue Nov 4, 2021 · 5 comments
Open

How to run the website demo locally? #1945

not-my-profile opened this issue Nov 4, 2021 · 5 comments

Comments

@not-my-profile
Copy link
Contributor

It seems like Pyodide is currently only built in the GitHub action via a custom docker image.
Is there a way to run this locally? For example if you wanted to improve the demo.

@birkenfeld
Copy link
Member

Yeah, there is no good description for that currently. You can probably see from the action that the "magic" all happens in the birkenfeld/pyodide-pygments-builder docker container, which is built from https://github.com/pygments/pyodide-artifacts. This then has to be run with the GITHUB_WORKSPACE variable set properly, but that should be more or less it.

@not-my-profile
Copy link
Contributor Author

What should GITHUB_WORKSPACE be set to?

@birkenfeld
Copy link
Member

If I interpret it correctly, it will be the path where the repository checkout is mounted into the container. The container entrypoint will copy the package from there, build the JS artifacts, and copy it back to pyodide in the checkout root. The workflow then copies that into the Sphinx output under _static.

@Anteru
Copy link
Collaborator

Anteru commented Dec 31, 2021

Should we keep this open? Do we need to update the docs?

@not-my-profile
Copy link
Contributor Author

not-my-profile commented Dec 31, 2021

I actually did not manage to get it working with docker and ended up downloading the _static/pyodide/ files from the pygments.github.io repository (which suffices for just testing changes to the demo JavaScript).

I think ideally the Makefile would print some instructions when run with WEBSITE_BUILD=1.

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

No branches or pull requests

3 participants