build: API Reference generation procedure simplified

This commit is contained in:
Mateusz Pusz
2024-09-25 12:39:37 +02:00
parent ab888aaecd
commit 1c31a2e7cb
3 changed files with 9 additions and 16 deletions

View File

@ -55,12 +55,9 @@ jobs:
run: |
sudo apt install latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended lmodern
sudo apt install haskell-stack graphviz nodejs npm ghc cabal-install
npm install split mathjax-full mathjax-node-sre
npm install split mathjax-full mathjax-node-sre mathjax-node-cli
cabal update
- name: Installing MathJax-Node-CLI
run: |
git clone https://github.com/mathjax/mathjax-node-cli --depth=1
echo "${{ github.workspace }}/mathjax-node-cli/bin" >> $GITHUB_PATH
echo "~/node_modules/.bin" >> $GITHUB_PATH
- name: Get git repos with API reference tools
run: |
git clone https://github.com/JohelEGP/jegp.cmake_modules.git --depth=1

View File

@ -32,9 +32,6 @@ RUN sudo install-packages \
npm \
ghc \
cabal-install
RUN npm install split mathjax-full mathjax-node-sre
RUN npm install split mathjax-full mathjax-node-sre mathjax-node-cli
RUN cabal update
# Install MathJax-Node-CLI
RUN git clone https://github.com/mathjax/mathjax-node-cli --depth=1
RUN echo "export PATH=\"$PWD/mathjax-node-cli/bin:\$PATH\"" >> ~/.bashrc
RUN echo "export PATH=\"~/node_modules/.bin:\$PATH\"" >> ~/.bashrc

View File

@ -190,17 +190,16 @@ directory:
```bash
sudo apt install latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended lmodern
sudo apt install haskell-stack graphviz nodejs npm ghc cabal-install
npm install split mathjax-full mathjax-node-sre
npm install split mathjax-full mathjax-node-sre mathjax-node-cli
cabal update
```
Also, installing `mathjax-node-cli` through npm does not help because `tex2html` is not called within
node.js. This is why we need to download `mathjax-node-cli` and add its `bin` folder to the `PATH`
environment variable:
On some platforms, installing `mathjax-node-cli` through `npm` does update the system's `PATH`
environment variable resulting in `tex2html` not found errors. In such cases we need to add
the `.bin` folder to the `PATH` environment variable manually:
```bash
git clone https://github.com/mathjax/mathjax-node-cli
echo "export PATH=\"$PWD/mathjax-node-cli/bin:\$PATH\"" >> ~/.bashrc && source ~/.bashrc
echo "export PATH=\"~/node_modules/.bin:\$PATH\"" >> ~/.bashrc && source ~/.bashrc
```
Next, we need to clone the following git repositories: