Build main by @katydecorah #27
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
name: Build | |
run-name: Build ${{ github.ref_name }} by @${{ github.actor }} | |
permissions: | |
contents: write | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
- run: npm ci | |
- run: rm -rf dist/* | |
- run: npm run build | |
- name: Commit files | |
run: | | |
git pull | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add dist | |
if git diff --staged --quiet; then | |
echo "::notice::No changes to commit" | |
else | |
git commit -m "Build action" | |
git push | |
fi |