fix(deps): update dependencies #75
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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
env: | |
NODE_VERSION: '20.x' | |
FOLDER_PATH_STORYBOOK_BUILD: ./build-storybook-static | |
jobs: | |
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: ${{ 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: Lint β | |
run: npm run lint | |
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: | |
name: Deploy Storybook π | |
runs-on: ubuntu-latest | |
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: ${{ 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 storybook-build | |
- name: Deploy π | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: ${{ env.FOLDER_PATH_STORYBOOK_BUILD }} | |
clean: true | |
release-npm: | |
name: Release npm π | |
runs-on: ubuntu-latest | |
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: ${{ 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 | |
- name: Release π | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npm run release |