-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add bundle-check workflow, migrate to pnpm 8 (#82)
* Add bundle-check workflow * migrate to pnpm 8 * file diff * fix? * revert file diff
- Loading branch information
Showing
2 changed files
with
187 additions
and
128 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Bundle Size Check | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
bundle-size: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Install pnpm | ||
run: npm install -g pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build project | ||
run: pnpm run build | ||
|
||
- name: Calculate bundle size | ||
id: bundle-size | ||
run: | | ||
SIZE=$(du -s dist | awk '{print $1}') | ||
echo "Bundle size: $SIZE bytes" | ||
echo "::set-output name=size::$SIZE" | ||
- name: Store bundle size as artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: bundle-size | ||
path: | | ||
dist/ | ||
!dist/**/*.map | ||
- name: Add bundle size comment | ||
uses: peter-evans/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
issue-number: ${{ github.event.pull_request.number }} | ||
body: | | ||
📦 **Bundle size:** The bundle size increased by ${{ steps.bundle-size.outputs.size }} bytes. |
Oops, something went wrong.
935aa68
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
sortablejs-vue3 – ./
sortablejs-vue3-git-main-maxleiters-team.vercel.app
sortablejs-vue3.vercel.app
sortablejs-vue3-maxleiters-team.vercel.app
sortablejs-vue3.maxleiter.com