@@ -2,11 +2,20 @@ name: CI
22
33on :
44 push :
5+ tags :
6+ - ' v[0-9]*.[0-9]*.[0-9]*'
7+ - ' v[0-9]*.[0-9]*.[0-9]*a[0-9]*'
8+ - ' v[0-9]*.[0-9]*.[0-9]*b[0-9]*'
9+ - ' v[0-9]*.[0-9]*.[0-9]*rc[0-9]*'
510 branches :
611 - master
12+ - next2026
13+ - verdocs
714 pull_request :
815 branches :
916 - master
17+ - next2026
18+ - verdocs
1019 schedule :
1120 - cron : " 9 16 * * 1"
1221
@@ -19,108 +28,13 @@ jobs:
1928 fail-fast : false
2029 matrix :
2130 cfg :
22- - conda-env : psi
23- python-version : 3.7
24- label : Psi4-1.5
25- runs-on : ubuntu-latest
26- pytest : " "
27-
28- - conda-env : psi-nightly
29- python-version : " 3.10"
30- label : Psi4-1.6
31- runs-on : ubuntu-latest
32- pytest : " "
33-
34- - conda-env : psi-cf
35- python-version : " 3.12"
36- label : Psi4-1.8
37- runs-on : windows-latest
38- pytest : " -k 'not (hes2 or qchem or test_config)'"
39-
40- - conda-env : torchani
41- python-version : 3.8
42- label : ANI
43- runs-on : ubuntu-latest
44- pytest : " "
45-
46- - conda-env : openmm
47- python-version : 3.8
48- label : OpenMM
49- runs-on : ubuntu-latest
50- pytest : " "
51-
52- - conda-env : openmm
53- python-version : 3.12
54- label : OpenMM
55- runs-on : ubuntu-latest
56- pytest : " "
5731
5832 - conda-env : xtb
5933 python-version : " 3.10"
6034 label : xTB
6135 runs-on : ubuntu-latest
6236 pytest : " "
6337
64- - conda-env : qcore
65- python-version : 3.7
66- label : QCore
67- runs-on : ubuntu-latest
68- pytest : " "
69-
70- - conda-env : nwchem
71- python-version : 3.8
72- label : NWChem70
73- runs-on : ubuntu-latest
74- pytest : " "
75- # formerly NWChem v6.6 with python-version: 3.6 & runs-on: ubuntu-16.04 but ubuntu env retired by GH Sep 2021
76-
77- - conda-env : nwchem-cf
78- python-version : 3.12
79- label : NWChem
80- runs-on : ubuntu-latest
81- pytest : " "
82-
83- - conda-env : mrchem
84- python-version : 3.8
85- label : MRChem
86- runs-on : ubuntu-latest
87- pytest : " "
88-
89- - conda-env : adcc
90- python-version : 3.8
91- label : ADCC
92- runs-on : ubuntu-latest
93- pytest : " "
94-
95- - conda-env : opt-disp
96- python-version : 3.13
97- label : optimization-dispersion
98- runs-on : ubuntu-latest
99- pytest : " "
100-
101- - conda-env : opt-disp-cf
102- python-version : 3.11
103- label : optimization-dispersion
104- runs-on : windows-latest
105- pytest : " -k 'not (hes2 or qchem or test_config)'"
106-
107- - conda-env : mace
108- python-version : " 3.10"
109- label : MACE
110- runs-on : ubuntu-latest
111- pytest : " "
112-
113- - conda-env : aimnet2
114- python-version : 3.11
115- label : AIMNET2
116- runs-on : ubuntu-latest
117- pytest : " "
118-
119- - conda-env : opt-disp-cf
120- python-version : 3.12
121- label : QCSk-next
122- runs-on : ubuntu-latest
123- pytest : " "
12438
12539 name : " 🐍 ${{ matrix.cfg.python-version }} • ${{ matrix.cfg.label }} • ${{ matrix.cfg.runs-on }}"
12640 runs-on : ${{ matrix.cfg.runs-on }}
@@ -280,9 +194,82 @@ jobs:
280194 cd docs
281195 make html
282196
197+ - name : Compute docs deploy target
198+ id : target
199+ shell : bash
200+ run : |
201+ set -euo pipefail
202+
203+ echo GITHUB_REF_TYPE ${GITHUB_REF_TYPE}
204+ echo GITHUB_REF_NAME ${GITHUB_REF_NAME}
205+ echo GITHUB_REF ${GITHUB_REF}
206+ if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
207+ echo "target_folder=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
208+ echo "version_label=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
209+
210+ elif [[ "${GITHUB_REF_NAME}" == "master" || "${GITHUB_REF_NAME}" == "verdocs" ]]; then
211+ echo "target_folder=dev" >> "$GITHUB_OUTPUT"
212+ echo "version_label=dev" >> "$GITHUB_OUTPUT"
213+
214+ elif [[ "${GITHUB_REF_NAME}" == "next2026" ]]; then
215+ echo "target_folder=next" >> "$GITHUB_OUTPUT"
216+ echo "version_label=next" >> "$GITHUB_OUTPUT"
217+
218+ else
219+ echo "target_folder=" >> "$GITHUB_OUTPUT"
220+ echo "version_label=" >> "$GITHUB_OUTPUT"
221+ fi
222+ echo GITHUB_OUTPUT ${GITHUB_OUTPUT}
223+
283224 - name : GitHub Pages Deploy
284- uses : JamesIves/github-pages-deploy-action@4.1.1
285- if : github.event_name == 'push' && github.repository == 'MolSSI/QCEngine' && ( startsWith( github.ref, 'refs/tags/' ) || github.ref == 'refs/heads/master' )
225+ uses : JamesIves/github-pages-deploy-action@v4
226+ if : github.event_name == 'push' && github.repository == 'MolSSI/QCEngine' && ( startsWith( github.ref, 'refs/tags/' ) || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/verdocs' )
286227 with :
287228 branch : gh-pages
288229 folder : docs/build/html
230+ target-folder : ${{ steps.target.outputs.target_folder }}
231+ clean : false
232+
233+ - name : Update versions.json
234+ if : github.event_name == 'push' && github.repository == 'MolSSI/QCEngine' && ( startsWith( github.ref, 'refs/tags/' ) || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/verdocs' )
235+ shell : bash
236+ env :
237+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
238+ VERSION_LABEL : ${{ steps.target.outputs.version_label }}
239+ TARGET_FOLDER : ${{ steps.target.outputs.target_folder }}
240+ run : |
241+ set -euo pipefail
242+ rm -rf _ghp
243+ git clone --depth 1 --branch gh-pages "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" _ghp
244+ cd _ghp
245+ # Create versions.json if it doesn't exist yet
246+ if [[ ! -f versions.json ]]; then
247+ cat > versions.json <<'JSON'
248+ [
249+ {"label": "dev", "path": "dev/"},
250+ {"label": "next", "path": "next/"}
251+ ]
252+ JSON
253+ fi
254+ python - <<'PY'
255+ import json, pathlib, os
256+ p = pathlib.Path("versions.json")
257+ data = json.loads(p.read_text())
258+ pinned = [
259+ {"label": "dev", "path": "dev/"},
260+ {"label": "next", "path": "next/"},
261+ ]
262+ lbl = os.environ.get("VERSION_LABEL", "")
263+ tgt = os.environ.get("TARGET_FOLDER", "")
264+ if lbl and lbl not in ("dev", "next") and tgt:
265+ pinned.insert(1, {"label": lbl, "path": tgt.rstrip("/") + "/"})
266+ p.write_text(json.dumps(pinned, indent=2) + "\n")
267+ PY
268+ if ! git diff --quiet; then
269+ git config user.name "github-actions[bot]"
270+ git config user.email "github-actions[bot]@users.noreply.github.com"
271+ git add versions.json
272+ git commit -m "docs: update versions.json (${GITHUB_REF})"
273+ git push origin gh-pages
274+ fi
275+
0 commit comments