diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index f6a9436..4059e9f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -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 $?)" \ No newline at end of file + 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 }} \ No newline at end of file