Skip to content

Commit

Permalink
Create build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
katydecorah committed Apr 28, 2024
1 parent 6bd80cc commit 56931dc
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build
run-name: Build ${{ github.ref_name }} by @${{ github.actor }}

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

0 comments on commit 56931dc

Please sign in to comment.