Skip to content

Commit

Permalink
Add workflow to minify
Browse files Browse the repository at this point in the history
  • Loading branch information
tamo committed Dec 7, 2023
1 parent 031110a commit 25bc0f1
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Minify with terser
on:
push:
paths:
- 'coi-serviceworker.js'
permissions:
contents: write
jobs:
minify:
name: minify
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v3
- name: install deps
run: npm ci
- name: minify
run: npm run minify
- name: commit and push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "Minify"
git push origin HEAD:${GITHUB_REF}

0 comments on commit 25bc0f1

Please sign in to comment.