generated from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
0315e33
commit 35fe2a9
Showing
1 changed file
with
8 additions
and
11 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 |
---|---|---|
|
@@ -79,30 +79,27 @@ jobs: | |
- name: Build project | ||
run: npm run build | ||
|
||
- name: Setup git user | ||
run: | | ||
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" | ||
git config --global user.email "[email protected]" | ||
- name: Add dist and types | ||
run: | | ||
git add -f ./dist | ||
git add -f ./types | ||
- name: Check if dist directory has changed | ||
id: check-dist-changes | ||
run: | | ||
before_commit="${{ github.event.before }}" | ||
if git diff --exit-code; then | ||
if git diff --no-ignore --exit-code; then | ||
echo "dist_changed=false" >> "$GITHUB_ENV" | ||
echo "No changes detected in the dist directory." | ||
else | ||
echo "dist_changed=true" >> "$GITHUB_ENV" | ||
fi | ||
- name: Setup git user | ||
run: | | ||
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" | ||
git config --global user.email "[email protected]" | ||
- name: Commit dist and/or types if changed | ||
if: steps.check-dist-changes.outputs.dist_changed == 'true' | ||
run: | | ||
git add -f ./dist | ||
git add -f ./types | ||
git commit -m "${{ env.CI_COMMIT_MESSAGE }}" | ||
git push |