Skip to content

cleanup & replace Ctrl to Alt key #97

cleanup & replace Ctrl to Alt key

cleanup & replace Ctrl to Alt key #97

Workflow file for this run

name: 'Doc build (HTML & PDF)'
on:
push:
branches:
- master
jobs:
build-doc:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@main
- name: Install
run: |
sudo apt update
sudo apt install nodejs npm
sudo apt install texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra
pip install --upgrade pip
pip install Sphinx
pip install sphinxcontrib-inlinesyntaxhighlight
pip install sphinx-sitemap
git clone https://github.com/FreeFem/FreeFem-parser-pygments.git ~/pygments
sudo cp ~/pygments/freefem.py /home/runner/.local/lib/python3.10/site-packages/pygments/lexers/
(cd /home/runner/.local/lib/python3.10/site-packages/pygments/lexers/ && sudo python _mapping.py)
sed -i 's/, BaseTranslator//g' /home/runner/.local/lib/python3.10/site-packages/sphinxcontrib/inlinesyntaxhighlight.py
sed -i "s/self.highlightlang/'python'/g" /home/runner/.local/lib/python3.10/site-packages/sphinxcontrib/inlinesyntaxhighlight.py
- name: Build PDF
run: |
make clean
make latex
(cd build/latex && pdflatex -halt-on-error -interaction=nonstopmode -jobname FreeFEM-documentation FreeFEM.tex && makeindex FreeFEM-documentation.idx && pdflatex -halt-on-error -interaction=nonstopmode -jobname FreeFEM-documentation FreeFEM.tex)
(cd build/latex && md5sum FreeFEM-documentation.pdf >> FreeFEM-documentation.pdf.md5)
- name: Build HTML
run: |
make html
echo "doc.freefem.org" > build/html/CNAME
echo "TODO: Remove the PDF from the website repository at the next FreeFem-source release"
mkdir build/html/pdf && cp build/latex/FreeFEM-documentation.pdf build/html/pdf/
(cd build/html/pdf && md5sum FreeFEM-documentation.pdf >> FreeFEM-documentation.pdf.md5)
- name: Deploy HTML
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: gh-pages
folder: build/html
- name: Deploy PDF
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: pdf
folder: build/latex