2023-01-02 14:13:45 -05:00
|
|
|
name: UI Components
|
|
|
|
|
2024-03-16 11:54:48 -05:00
|
|
|
on:
|
2024-01-22 02:11:54 -05:00
|
|
|
workflow_dispatch:
|
2024-03-16 11:54:48 -05:00
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * *'
|
2024-01-22 02:11:54 -05:00
|
|
|
|
2023-01-02 14:13:45 -05:00
|
|
|
permissions:
|
2023-10-23 14:55:27 -05:00
|
|
|
contents: read # to fetch code (actions/checkout)
|
2023-01-02 14:13:45 -05:00
|
|
|
|
2023-01-08 05:27:37 -05:00
|
|
|
env:
|
|
|
|
DEBUG: verdaccio*
|
|
|
|
|
2023-01-02 14:13:45 -05:00
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
permissions:
|
2023-10-23 14:55:27 -05:00
|
|
|
contents: read # to fetch code (actions/checkout)
|
2023-01-02 14:13:45 -05:00
|
|
|
deployments: write
|
2023-10-23 14:55:27 -05:00
|
|
|
pull-requests: write # to comment on pull-requests
|
2023-01-02 14:13:45 -05:00
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
2024-04-28 04:52:38 -05:00
|
|
|
if: github.repository == 'verdaccio/verdaccio'
|
2023-01-02 14:13:45 -05:00
|
|
|
env:
|
|
|
|
NODE_OPTIONS: --max_old_space_size=4096
|
|
|
|
steps:
|
2024-06-01 14:39:12 -05:00
|
|
|
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v3
|
2023-01-02 14:13:45 -05:00
|
|
|
|
|
|
|
- name: Use Node
|
2024-02-13 02:15:45 -05:00
|
|
|
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
2023-01-02 14:13:45 -05:00
|
|
|
with:
|
|
|
|
node-version-file: '.nvmrc'
|
|
|
|
|
|
|
|
- name: Cache pnpm modules
|
2024-05-11 03:02:17 -05:00
|
|
|
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v3
|
2023-01-02 14:13:45 -05:00
|
|
|
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
|
2023-10-23 14:55:27 -05:00
|
|
|
corepack prepare --activate pnpm@8.9.0
|
2023-01-02 14:13:45 -05:00
|
|
|
- name: Install
|
2023-10-23 14:55:27 -05:00
|
|
|
run: pnpm install
|
2023-01-02 14:13:45 -05:00
|
|
|
- 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
|
2024-03-16 11:54:48 -05:00
|
|
|
- name: Deploy to Netlify
|
|
|
|
env:
|
|
|
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_UI_SITE_ID }}
|
|
|
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
2024-03-16 12:11:30 -05:00
|
|
|
run: pnpm --filter ...@verdaccio/ui-components netlify:ui:deploy
|