Skip to content

Commit fcb416a

Browse files
authored
Run test_overview_available_software.yml on PRs
1 parent f2f2ad5 commit fcb416a

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

.github/workflows/test_overview_available_software.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,24 @@ jobs:
2525
. venv/bin/activate
2626
pip install -r mkdocs-ldjson-plugin/requirements.txt
2727
28-
# disabled, this needs to be re-worked after the changes implemented in https://github.com/EESSI/docs/pull/677
29-
# python .github/workflows/scripts/test_overview_available_software.py
28+
# download https://eessi.io/api_data/data/eessi_api_metadata_software.json
29+
# to where it's expected by docs/available_software/macros.py and scripts/available_software/available_software.py
30+
data_dir="docs/available_software/data"
31+
mkdir -p ${data_dir}
32+
cd ${data_dir}
33+
curl -OL https://eessi.io/api_data/data/eessi_api_metadata_software.json
34+
cd -
35+
36+
python scripts/available_software/available_software.py
37+
./scripts/update_generated_time.sh mkdocs.yml
38+
39+
# determine whether pull request should be opened:
40+
# if detailed software pages in docs/available_software/detail have been updated, then a PR should be opened
41+
if [[ $(git status --porcelain ./docs/available_software/detail) ]]; then
42+
echo "Software pages have been changed, PR should be opened"
43+
else
44+
echo "Software pages have not been changed, no need to open PR"
45+
fi
46+
47+
# remove the data directory containing the original JSON file, or it'll end up in the PR being opened
48+
rm -f ${data_dir}

0 commit comments

Comments
 (0)