diff --git a/.github/workflows/check-node-modules-size.yml b/.github/workflows/check-node-modules-size.yml index 06e840b..4f2a8b6 100644 --- a/.github/workflows/check-node-modules-size.yml +++ b/.github/workflows/check-node-modules-size.yml @@ -1,16 +1,7 @@ name: Check Node Modules Size -on: - pull_request: - paths: - # `yarn.lock` should no longer be present, but we'll keep this here in case we add it back. - - yarn.lock - - package.json - - package-lock.json - - push: - branches: - - "*" +# https://stackoverflow.com/questions/68737385/how-to-trigger-github-actions-on-push-of-current-branch/68737519#68737519 +on: [push] jobs: analyze-size: @@ -69,13 +60,13 @@ jobs: uses: actions/github-script@v6 with: script: | - const body = `\`node_modules/\` size has changed!\n + const body = `\`node_modules/\` has changed in size.\n Main branch size: ${process.env.MAIN_SIZE}\n Current branch size: ${process.env.CURRENT_SIZE}` - const { owner, repo } = github.context.repo; - const commit_sha = github.context.sha; - console.log('commit_sha:', commit_sha'); + const { owner, repo } = context.repo; + const commit_sha = context.sha; + console.log('commit_sha:', commit_sha); console.log('owner:', owner); console.log('repo:', repo); const { data } = await github.rest.repos.listPullRequestsAssociatedWithCommit({ diff --git a/package.json b/package.json index 8d7e478..8441034 100644 --- a/package.json +++ b/package.json @@ -12,13 +12,13 @@ "build": "npm run build:style && react-scripts build", "build:icons": "pwa-asset-generator ./public/icons/light-icon.svg public/icons --padding 0px --background '#FBDC57' --index ./public/index.html --path '%PUBLIC_URL%' --manifest public/manifest.json && pwa-asset-generator ./public/icons/dark-icon.svg public/icons --padding 0px --background 'black' --dark-mode --splash-only --index ./public/index.html --path '%PUBLIC_URL%' && prettier 'public/index.html' --write", "build:style": "tailwindcss build src/styles.css -o src/build.css", + "build-storybook": "build-storybook -s public", "e2e": "cypress run", "eject": "react-scripts eject", "lint": "eslint . --fix --ignore-path .gitignore", "start": "npm run build:style && react-scripts start", "test": "react-scripts test --env=jsdom", - "storybook": "start-storybook -p 6006 -s public", - "build-storybook": "build-storybook -s public" + "storybook": "start-storybook -p 6006 -s public" }, "husky": { "hooks": {