-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
10 additions
and
7 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 |
---|---|---|
|
@@ -16,29 +16,32 @@ jobs: | |
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: main # or 'master' depending on your default branch name | ||
ref: master # Make sure this matches your default branch name | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' | ||
|
||
- name: List directory structure | ||
- name: Debug Directory Contents | ||
run: | | ||
echo "Current directory:" | ||
pwd | ||
echo "Directory contents:" | ||
ls -la | ||
echo "Pictures directory contents:" | ||
ls -la pictures/ | ||
- name: Run updateMosaic.js | ||
run: | | ||
node updateMosaic.js | ||
- name: Verify images.js | ||
run: cat images.js | ||
echo "Generated images.js contents:" | ||
cat images.js | ||
- name: Commit and push if changed | ||
run: | | ||
git config --global user.name 'GitHub Action' | ||
git config --global user.email '[email protected]' | ||
git add images.js | ||
git diff --quiet && git diff --staged --quiet || (git commit -m "Update images.js [skip ci]" && git push) | ||
git commit -m "Update images.js [skip ci]" || echo "No changes to commit" | ||
git push |