Skip to content

Commit

Permalink
Retry
Browse files Browse the repository at this point in the history
  • Loading branch information
LoomingEcho committed Apr 17, 2024
1 parent 35fe2a9 commit 82122f9
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,27 +79,29 @@ 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
run: |
git add -f ./dist
- name: Check if dist directory has changed
id: check-dist-changes
run: |
before_commit="${{ github.event.before }}"
if git diff --no-ignore --exit-code; then
echo "dist_changed=false" >> "$GITHUB_ENV"
if git diff --quiet HEAD "$before_commit" -- ./dist; then
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
- name: Commit and push dist
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

0 comments on commit 82122f9

Please sign in to comment.