diff --git a/.github/workflows/update_submodule.yml b/.github/workflows/update_submodule.yml index 6de8011..be333c0 100644 --- a/.github/workflows/update_submodule.yml +++ b/.github/workflows/update_submodule.yml @@ -28,16 +28,14 @@ jobs: - name: Update submodule run: | - cd data - git switch main - output=$(git pull) + git submodule update --remote -- data + output=$(git status -s data) echo "$output" - cd .. - if [[ "$output" != *"Already up to date."* ]]; then + # Check if the status output is non-empty + if [[ -n "$output" ]]; then ./code/create_prerendered_figures.py fi - - name: Create pull request uses: peter-evans/create-pull-request@v7 with: