Skip to content

Feature/202403 npm update #343

Feature/202403 npm update

Feature/202403 npm update #343

on:
pull_request:
branches: [ master ]
paths:
- 'starsky/starsky/clientapp/.storybook/**'
- 'starsky/starsky/clientapp/package.json'
- 'starsky/starsky/clientapp/package-lock.json'
push:
branches: [ master ]
paths:
- 'starsky/starsky/clientapp/**'
workflow_dispatch:
name: storybook clientapp netlify
jobs:
test:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache node modules clientapp
uses: actions/cache@v4
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-clientapp-${{ hashFiles('./starsky/starsky/clientapp/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-clientapp-
- name: Install Dependencies
working-directory: ./starsky/starsky/clientapp
run: npm ci --no-progress --prefer-offline --legacy-peer-deps --no-fund
- name: build-storybook
working-directory: ./starsky/starsky/clientapp
run: npm run build-storybook
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: storybook-static
path: ./starsky/starsky/clientapp/storybook-static
- name: Deploy to Netlify
uses: nwtgck/[email protected]
if: github.event_name != 'pull_request'
with:
publish-dir: './starsky/starsky/clientapp/storybook-static'
production-branch: master
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: false
enable-commit-comment: true
overwrites-pull-request-comment: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1