mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
58 lines
1.8 KiB
YAML
58 lines
1.8 KiB
YAML
name: UI Components
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
|
|
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
|
|
if: github.repository == 'verdaccio/verdaccio'
|
|
env:
|
|
NODE_OPTIONS: --max_old_space_size=4096
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
|
|
- name: Use Node
|
|
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
|
|
- name: Cache pnpm modules
|
|
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
|
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 to Netlify
|
|
env:
|
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_UI_SITE_ID }}
|
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
|
run: pnpm --filter ...@verdaccio/ui-components netlify:ui:deploy
|