Skip to content

Commit

Permalink
add automate workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
chkfung committed Apr 4, 2024
1 parent 5bb7426 commit 0cf5c7a
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/automate_ncc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build with ncc

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install dependencies
run: npm ci

- name: Build with ncc
run: npx @vercel/ncc build index.js -o dist

- name: Commit and push if changed
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git add dist/index.js
git diff --quiet && git diff --staged --quiet || git commit -m "Automated build"
git push

0 comments on commit 0cf5c7a

Please sign in to comment.