mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-23 22:27:34 -05:00
487e2f77fe
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.0.1 to 4.0.2.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](b39b52d121...60edb5dd54
)
---
updated-dependencies:
- dependency-name: actions/setup-node
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
71 lines
2.6 KiB
YAML
71 lines
2.6 KiB
YAML
name: UI Components
|
||
|
||
on:
|
||
workflow_dispatch:
|
||
|
||
permissions:
|
||
contents: read # to fetch code (actions/checkout)
|
||
|
||
env:
|
||
DEBUG: verdaccio*
|
||
|
||
jobs:
|
||
deploy:
|
||
permissions:
|
||
contents: read # to fetch code (actions/checkout)
|
||
deployments: write
|
||
pull-requests: write # to comment on pull-requests
|
||
|
||
runs-on: ubuntu-latest
|
||
env:
|
||
NODE_OPTIONS: --max_old_space_size=4096
|
||
steps:
|
||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||
|
||
- name: Use Node
|
||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||
with:
|
||
node-version-file: '.nvmrc'
|
||
|
||
- name: Cache pnpm modules
|
||
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||
env:
|
||
cache-name: cache-pnpm-modules
|
||
with:
|
||
path: ~/.pnpm-store
|
||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||
restore-keys: |
|
||
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
|
||
|
||
- name: Install pnpm
|
||
run: |
|
||
corepack enable
|
||
corepack prepare --activate pnpm@8.9.0
|
||
- name: Install
|
||
run: pnpm install
|
||
- name: Build storybook
|
||
run: pnpm ui:storybook:build
|
||
- name: Copy public content
|
||
# the msw.js worker is need it at the storybook-static folder in production
|
||
run: cp -R packages/ui-components/public/* packages/ui-components/storybook-static
|
||
- name: 🔥 Deploy Production UI Netlify
|
||
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'workflow_dispatch'
|
||
uses: verdaccio/action-netlify-deploy@1c086d59169edeec9254672c7de17d2ceac3928f # v2.0.0
|
||
with:
|
||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||
netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||
netlify-site-id: ${{ secrets.NETLIFY_UI_SITE_ID }}
|
||
build-dir: './packages/ui-components/storybook-static'
|
||
- name: 🤖 Deploy Preview UI Components Netlify
|
||
if: github.repository == 'verdaccio/verdaccio'
|
||
uses: semoal/action-netlify-deploy@1a53f098745bf78555d11b436f5ee3af87e6b566
|
||
id: netlify_preview_ui
|
||
with:
|
||
draft: true
|
||
comment-on-pull-request: true
|
||
github-deployment-is-production: false
|
||
github-deployment-is-transient: true
|
||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||
netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||
netlify-site-id: ${{ secrets.NETLIFY_UI_SITE_ID }}
|
||
build-dir: './packages/ui-components/storybook-static'
|