Skip to content

Commit dd40efb

Browse files
authored
Improves RMG-Py cloning in CI & fixes website build (#796)
Addresses an issue where the RMG-Py repository was being cloned repeatedly during CI runs. - Optimizes the CI workflow by checking for the existence of the RMG-Py directory before attempting to clone it. - If the directory exists, the workflow now fetches and checks out the specified commit instead of re-cloning the entire repository. Website deployment is now pointed to the ./ARC/ folder
2 parents 9ba9803 + 2dbd810 commit dd40efb

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

.github/workflows/cont_int.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,15 @@ jobs:
5757
- name: Clone & checkout RMG-Py at specific SHA
5858
if: steps.cache-rmg-py.outputs.cache-hit != 'true'
5959
run: |
60-
git clone --filter=blob:none --no-checkout https://github.com/ReactionMechanismGenerator/RMG-Py.git RMG-Py
61-
cd RMG-Py
62-
git fetch --no-tags --prune origin ${RMG_PY_COMMIT}
63-
git checkout --detach ${RMG_PY_COMMIT}
60+
if [ -d RMG-Py/.git ]; then
61+
echo "Updating cached RMG-Py…"
62+
git -C RMG-Py fetch --depth=1 origin ${RMG_PY_COMMIT}
63+
git -C RMG-Py checkout --force ${RMG_PY_COMMIT}
64+
else
65+
echo "Cloning RMG-Py…"
66+
git clone --filter=blob:none --no-checkout https://github.com/ReactionMechanismGenerator/RMG-Py.git RMG-Py
67+
git -C RMG-Py checkout --detach ${RMG_PY_COMMIT}
68+
fi
6469
6570
- name: Cache RMG-database
6671
id: cache-rmg-db

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,4 @@ jobs:
8181
uses: peaceiris/actions-gh-pages@v4
8282
with:
8383
github_token: ${{ secrets.GITHUB_TOKEN }}
84-
publish_dir: ./docs/build/html/
84+
publish_dir: ./ARC/docs/_build/html/

0 commit comments

Comments
 (0)