Skip to content

Commit

Permalink
[TEST] Update: 公式ドキュメントにしっかり従ってみる
Browse files Browse the repository at this point in the history
  • Loading branch information
yonta committed Jun 18, 2024
1 parent 609b3fa commit 760e713
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/esbuild-bundle-analyzer.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
name: ESBuild Bundle Analyzer

on: [pull_request]

permissions:
contents: read # for checkout repository
actions: read # for fetching base branch bundle stats
pull-requests: write # for comments
on: [pull_request_target]

jobs:
build:
# PLEASE AVOID ADDING OTHER JOBS IN THIS FILE
# BECAUSE THIS ACTION USE `pull_request_target` EVENT that grants write permissions to GitHub Actions running on PRs from forks.
analyze:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read # for checkout repository
actions: read # for fetching base branch bundle stats
pull-requests: write # for comments
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
with:
# This is required to fetch the commit SHA of the forked PR
ref: "${{ github.event.pull_request.merge_commit_sha }}"
- uses: actions/setup-node@v4
with:
node-version: "18"
node-version: 18
cache: "yarn"
- name: Install Dependencies
run: yarn workspaces focus --all --production
Expand All @@ -27,4 +31,4 @@ jobs:
# uses: exoego/esbuild-bundle-analyzer@main # If you prefer nightly!
uses: exoego/esbuild-bundle-analyzer@v1
with:
metafiles: "meta.json"
metafiles: "out/meta.json"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"lint:stylelint:fix": "yarn run lint:stylelint --fix",
"lint:markuplint": "markuplint \"app/views/**/*.html.erb\" \"public/*.html\"",
"build": "esbuild app/javascript/*.* --bundle --sourcemap --define:global=window --outdir=app/assets/builds",
"build:metafile": "esbuild app/javascript/*.* --bundle --metafile=meta.json --outdir=app/assets/builds",
"build:metafile": "esbuild app/javascript/*.* --bundle --metafile=out/meta.json --outdir=app/assets/builds",
"build:css": "sass ./app/assets/stylesheets/:./app/assets/builds/ --no-source-map --load-path=node_modules"
},
"packageManager": "yarn@4.0.2"
Expand Down

0 comments on commit 760e713

Please sign in to comment.