-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip generation of latest.json if there's no data
Fixing a bug that will overwrite the file if there's missing data.
- Loading branch information
Showing
2 changed files
with
13 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,12 +35,17 @@ jobs: | |
- name: Get data and update file | ||
run: | | ||
OUTPUT="$(node ./utils/GenerateLatestData.js)" | ||
echo "$OUTPUT" > ./website/public/data/latest.json | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add ./website/public/data/latest.json | ||
git commit -m "Update latest data" | ||
git push | ||
if [ -n "$OUTPUT" ]; then | ||
echo "$OUTPUT" > ./website/public/data/latest.json | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add ./website/public/data/latest.json | ||
git commit -m "Update latest data" | ||
git push | ||
else | ||
echo "No data generated, skipping Git operations." | ||
fi | ||
build-and-deploy-site: | ||
needs: generate-latest-data | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
did you mean to commit this?