add: code optimization #14
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 | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
compile: | |
runs-on: ubuntu-latest | |
permissions: | |
# Give the default GITHUB_TOKEN write permission to push | |
contents: write | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Setup pnpm & install | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 9 | |
run_install: true | |
- name: Build | |
run: pnpm run build | |
#- name: Lint | |
# run: npm run lint | |
- name: Add and Commit | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: 'dist' | |
message: "update: build dist files" | |
committer_name: Ops Bot | |
committer_email: actions@github.com |