Skip to content

Commit

Permalink
chore: Push changes in the /dist directory if there are changes in th…
Browse files Browse the repository at this point in the history
…e src/ directory
  • Loading branch information
somaromero committed Jul 30, 2024
1 parent 18b6740 commit 0e405f7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,16 @@ jobs:
- name: Check for changes in the src/ directory
run: |
git diff --exit-code src/
echo "::set-output name=changes::$(git diff --exit-code src/; echo $?)"
echo "changes=$(git diff --exit-code src/; echo $?)" >> $GITHUB_ENV
# Push changes in the /dist directory if there are changes in the src/ directory
- name: Push changes in the /dist directory
if: steps.check_changes.outputs.changes == '0'
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add dist/
git commit -m "Add built files from GitHub Actions [skip ci]"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0e405f7

Please sign in to comment.