diff options
author | Georg Brandl <georg@python.org> | 2020-09-01 14:17:47 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2020-09-01 14:17:47 +0200 |
commit | ceaad0372055ed0064121020fea032fdda429779 (patch) | |
tree | 02f5a5831959c8a5039216bab8c8a21ea64169a1 | |
parent | 54b1d0e2022bf97f3cee61cbb251b73e94ed8bcf (diff) | |
download | pygments-git-ceaad0372055ed0064121020fea032fdda429779.tar.gz |
demo: rebuild WASM with every push
-rw-r--r-- | .github/actions/pyodide-package/action.yml | 5 | ||||
-rw-r--r-- | .github/workflows/docs.yaml | 8 | ||||
-rw-r--r-- | doc/_static/demo.js | 3 | ||||
-rw-r--r-- | doc/_templates/demo.html | 3 |
4 files changed, 10 insertions, 9 deletions
diff --git a/.github/actions/pyodide-package/action.yml b/.github/actions/pyodide-package/action.yml new file mode 100644 index 00000000..2187cd9f --- /dev/null +++ b/.github/actions/pyodide-package/action.yml @@ -0,0 +1,5 @@ +name: 'Update Pyodide package' +description: 'Update the WASM compiled Pygments with Pyodide' +runs: + using: 'docker' + image: 'birkenfeld/pyodide-pygments-builder' diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 16d1f58f..6a4bb730 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -15,15 +15,15 @@ jobs: python-version: 3.7 - name: Checkout Pygments uses: actions/checkout@v1 - - name: Checkout Pyodide - run: git clone https://github.com/pygments/pyodide-artifacts - - name: Sphinx install + - name: Install Sphinx run: pip install Sphinx + - name: Create Pyodide WASM package + uses: ./.github/actions/pyodide-package - name: Sphinx build run: | cd doc WEBSITE_BUILD=1 make dirhtml - cp -a ../pyodide-artifacts/pyodide _build/dirhtml/_static + cp -a ../pyodide _build/dirhtml/_static touch _build/dirhtml/.nojekyll echo -e 'pygments.org\nwww.pygments.org' > _build/dirhtml/CNAME echo 'Automated deployment of docs for GitHub pages.' > _build/dirhtml/README diff --git a/doc/_static/demo.js b/doc/_static/demo.js index 872c2348..f538492e 100644 --- a/doc/_static/demo.js +++ b/doc/_static/demo.js @@ -23,9 +23,6 @@ languagePluginLoader.then(() => { } } - var ver = pyodide.runPython('pygments.__version__'); - document.getElementById("try-version").innerText = "Pygments version: " + ver; - document.getElementById("hlbtn").disabled = false; document.getElementById("loading").style.display = "none"; }); diff --git a/doc/_templates/demo.html b/doc/_templates/demo.html index fc511014..6a60df7d 100644 --- a/doc/_templates/demo.html +++ b/doc/_templates/demo.html @@ -16,10 +16,9 @@ <h1>Demo - Try it out!</h1> <p>The highlighting here is performed in-browser using - a WebAssembly translation of Pygments, courtesy of + a WebAssembly translation of the latest Pygments master branch, courtesy of <a href="https://github.com/iodide-project/pyodide">Pyodide</a>.</p> <p>Your content is neither sent over the web nor stored anywhere.</p> -<p id="try-version"></p> <div id="try"> <h2>Enter code and select a language</h2> |