Skip to content

Commit

Permalink
chore: modify build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
simonusher committed Nov 17, 2023
1 parent f86231f commit c715eea
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,15 @@ jobs:
run: |
npm run build
git diff --name-only
git_hash=$(git rev-parse --short "$GITHUB_SHA")
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "build-${git_hash}"
git push
if [[ `git status --porcelain` ]]; then
echo "Changes detected, pushing ${git_hash} to master"
git_hash=$(git rev-parse --short "$GITHUB_SHA")
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "build-${git_hash}"
git push
else
echo "No changes, skipping push"
fi

0 comments on commit c715eea

Please sign in to comment.