Skip to content

Commit

Permalink
Merge pull request #20 from chkfung/ncc-automate
Browse files Browse the repository at this point in the history
Ncc automate
  • Loading branch information
chkfung authored Apr 4, 2024
2 parents 5bb7426 + d80575a commit 71d1c90
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/automate_ncc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build with ncc

on:
push:
branches:
- master

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 71d1c90

Please sign in to comment.