Skip to content

Commit

Permalink
fix(deps): update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mkosir committed Nov 5, 2024
1 parent 77a374f commit 627780f
Showing 1 changed file with 62 additions and 8 deletions.
70 changes: 62 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,47 @@ name: CI
on: push

env:
NODE_VERSION: '20.x'
FOLDER_PATH_STORYBOOK_BUILD: ./build-storybook-static

jobs:
validate:
build:
name: Build πŸ—οΈ
runs-on: ubuntu-latest

steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Cache dependencies ⚑
id: cache_dependencies
uses: actions/cache@v4
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}

- name: Install dependencies πŸ”§
if: steps.cache_dependencies.outputs.cache-hit != 'true'
run: npm ci

- name: Build πŸ—οΈ
run: npm run build

lint:
name: Lint βœ…
runs-on: ubuntu-latest

steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: ${{ env.NODE_VERSION }}

- name: Cache dependencies ⚑
id: cache_dependencies
Expand All @@ -30,20 +59,44 @@ jobs:
- name: Lint βœ…
run: npm run lint

- name: Build πŸ—οΈ
run: npm run build
tsc:
name: TypeScript Compiler πŸ”Ž
runs-on: ubuntu-latest

steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Cache dependencies ⚑
id: cache_dependencies
uses: actions/cache@v4
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}

- name: Install dependencies πŸ”§
if: steps.cache_dependencies.outputs.cache-hit != 'true'
run: npm ci

- name: TypeScript Compiler πŸ”Ž
run: npm run tsc

storybook:
runs-on: ubuntu-latest
needs: [validate]
needs: [build, lint, tsc]
if: github.ref == 'refs/heads/main'

steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: ${{ env.NODE_VERSION }}

- name: Cache dependencies ⚑
id: cache_dependencies
Expand All @@ -68,17 +121,18 @@ jobs:

npm-release:
runs-on: ubuntu-latest
needs: [validate]
needs: [build, lint, tsc]
if: github.ref == 'refs/heads/main'
env:
NODE_ENV: 'production'

steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: ${{ env.NODE_VERSION }}

- name: Cache dependencies ⚑
id: cache_dependencies
Expand Down

0 comments on commit 627780f

Please sign in to comment.