Skip to content

Commit

Permalink
use stefanzweifel
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw committed Jul 14, 2023
1 parent 52254e0 commit 30f72df
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ jobs:
check-dist:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- name: Install pnpm
uses: pnpm/action-setup@v2
Expand All @@ -28,15 +33,7 @@ jobs:
- name: Rebuild the dist/ directory
run: pnpm build

- name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol dist/* | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
echo "Committing changes to dist/ directory."
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add dist/
git commit -m "Build dist/ directory"
git push
fi
- name: Commit dist/ changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Build dist/ directory

0 comments on commit 30f72df

Please sign in to comment.