@@ -2,82 +2,83 @@ name: github pages
22
33on :
44 push :
5- branches :
6- - main
7- - docs
5+ branches : [ main, docs ]
6+ pull_request :
7+ branches : [ main, docs ]
8+ types : [opened, synchronize, reopened, ready_for_review]
89
910jobs :
1011 deploy :
1112 runs-on : ubuntu-latest
12- defaults :
13- run :
14- shell : bash -l {0}
1513
1614 steps :
17- - uses : actions/checkout@v3
15+ # ── clone ARC repo ───────────────────────────────────────────
16+ - name : Checkout ARC
17+ uses : actions/checkout@v4
18+ with :
19+ repository : ReactionMechanismGenerator/ARC
20+ path : ARC
21+ fetch-depth : 1
1822
19- - name : Clean Ubuntu Image
20- uses : kfir4444/free-disk-space@main
21- with :
22- # This may remove tools actually needed - currently does not
23- tool-cache : true
24- android : true
25- dotnet : true
26- haskell : true
27- large-packages : true
28- swap-storage : true
23+ # ── pull RMG sources ────────────────────────────────────────
24+ - name : Checkout RMG‑Py
25+ uses : actions/checkout@v4
26+ with :
27+ repository : ReactionMechanismGenerator/RMG-Py
28+ path : RMG-Py
29+ ref : 55464c54d1fa61b531e865682df598d33718597d
30+ fetch-depth : 1
2931
30- - name : Set up miniconda
31- uses : conda-incubator/setup-miniconda@v3
32- with :
33- auto-update-conda : true
34- environment-file : environment.yml
35- activate-environment : arc_env
36- miniconda-version : latest
37- conda-solver : libmamba
32+ - name : Checkout RMG‑database
33+ uses : actions/checkout@v4
34+ with :
35+ repository : ReactionMechanismGenerator/RMG-database
36+ path : RMG-database
37+ fetch-depth : 1
3838
39- # - name: Update environment
40- # run: |
41- # conda env update -n arc_env -f environment.yml
42- # conda list
39+ # ── build‑only env ───────────────────────────────────────────
40+ - name : Set up micromamba (rmg_env)
41+ uses : mamba-org/setup-micromamba@v2
42+ with :
43+ environment-name : rmg_env
44+ environment-file : RMG-Py/environment.yml
45+ cache-environment : true
46+ cache-downloads : true
47+ generate-run-shell : false
4348
44- - name : Install LaTeX
45- run : |
46- sudo apt update -y && sudo apt upgrade -y && sudo apt autoremove -y
47- sudo apt install texlive-latex-base -y
48- sudo apt-get install texlive-latex-extra -y
49- sudo apt-get install -y dvipng
49+ - name : Build RMG‑Py in rmg_env
50+ run : micromamba run -n rmg_env make -C RMG-Py -j"$(nproc)"
5051
52+ # ── docs env (wrapper shell) ────────────────────────────────
53+ - name : Set up micromamba (arc_env)
54+ uses : mamba-org/setup-micromamba@v2
55+ with :
56+ environment-name : arc_env
57+ environment-file : ARC/environment.yml
58+ cache-environment : true
59+ cache-downloads : true
5160
52- - name : Install codecov
53- run : conda install --force-reinstall ld_impl_linux-64 -y && conda install -y -c conda-forge codecov
61+ # ── minimal TeX for png‑math in Sphinx ──────────────────────
62+ - name : System TeX tools
63+ run : sudo apt-get update -y && sudo apt-get -y install texlive-latex-extra dvipng
5464
55- - name : Install dependencies
56- run : |
57- export PYTHONPATH=$PYTHONPATH:$(pwd)
58- conda activate arc_env
59- cd ..
60- git clone https://github.com/ReactionMechanismGenerator/RMG-database
61- git clone https://github.com/ReactionMechanismGenerator/RMG-Py
62- cd RMG-Py
63- export PYTHONPATH=$PYTHONPATH:$(pwd)
64- make
65- cd ../ARC/
66- conda deactivate
65+ # ── add legacy ABI runtime for NumPy/PyDAS ─────────────────
66+ - name : Add legacy gfortran runtime
67+ run : micromamba install -y -n arc_env -c conda-forge libgfortran=3
68+ shell : micromamba-shell {0}
6769
68- - name : Compile docs
69- run : |
70- export PYTHONPATH=$PYTHONPATH:$(pwd)
71- conda activate arc_env
72- cd ../RMG-Py
73- export PYTHONPATH=$PYTHONPATH:$(pwd)
74- cd ../ARC/docs/
75- make html
70+ # ── build HTML docs ─────────────────────────────────────────
71+ - name : Build docs
72+ run : |
73+ export PYTHONPATH=$GITHUB_WORKSPACE/RMG-Py:$GITHUB_WORKSPACE/ARC:$PYTHONPATH
74+ export PATH=$GITHUB_WORKSPACE/ARC:$PATH
75+ make -C ARC/docs html
76+ shell : micromamba-shell {0}
7677
77- - name : Deploy
78- uses : peaceiris/actions-gh-pages@v3.7.3
79- with :
80- github_token : ${{ secrets.GITHUB_TOKEN }}
81- publish_dir : ./docs/build/html/
82-
83- # https://github.com/marketplace/actions/github-pages-action
78+ # ── deploy only on push ─────────────────────────────────────
79+ - name : Deploy to GitHub Pages
80+ if : github.event_name == 'push'
81+ uses : peaceiris/actions-gh-pages@v4
82+ with :
83+ github_token : ${{ secrets.GITHUB_TOKEN }}
84+ publish_dir : ./docs/build/html/
0 commit comments