2023-01-02 20:13:45 +01:00
|
|
|
name: UI Components
|
|
|
|
|
2024-03-16 17:54:48 +01:00
|
|
|
on:
|
2024-11-28 10:53:05 +01:00
|
|
|
# pull_request:
|
2024-01-22 08:11:54 +01:00
|
|
|
workflow_dispatch:
|
2024-11-28 10:53:05 +01:00
|
|
|
# schedule:
|
|
|
|
# - cron: '0 0 * * *'
|
2024-01-22 08:11:54 +01:00
|
|
|
|
2023-01-02 20:13:45 +01:00
|
|
|
permissions:
|
2023-10-23 21:55:27 +02:00
|
|
|
contents: read # to fetch code (actions/checkout)
|
2023-01-02 20:13:45 +01:00
|
|
|
|
2023-01-08 11:27:37 +01:00
|
|
|
env:
|
|
|
|
DEBUG: verdaccio*
|
|
|
|
|
2023-01-02 20:13:45 +01:00
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
permissions:
|
2023-10-23 21:55:27 +02:00
|
|
|
contents: read # to fetch code (actions/checkout)
|
2023-01-02 20:13:45 +01:00
|
|
|
deployments: write
|
2023-10-23 21:55:27 +02:00
|
|
|
pull-requests: write # to comment on pull-requests
|
2023-01-02 20:13:45 +01:00
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
2024-04-28 11:52:38 +02:00
|
|
|
if: github.repository == 'verdaccio/verdaccio'
|
2023-01-02 20:13:45 +01:00
|
|
|
env:
|
|
|
|
NODE_OPTIONS: --max_old_space_size=4096
|
|
|
|
steps:
|
2024-11-02 10:02:18 +01:00
|
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
2023-01-02 20:13:45 +01:00
|
|
|
|
2024-11-28 10:53:05 +01:00
|
|
|
- name: Install dependencies with a custom registry
|
|
|
|
uses: ./.github/actions/install-app
|
2023-01-02 20:13:45 +01:00
|
|
|
|
|
|
|
- name: Install pnpm
|
|
|
|
run: |
|
|
|
|
corepack enable
|
2024-11-28 10:53:05 +01:00
|
|
|
corepack prepare
|
2023-01-02 20:13:45 +01:00
|
|
|
- name: Install
|
2024-11-28 10:53:05 +01:00
|
|
|
run: pnpm install
|
2023-01-02 20:13:45 +01: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 17:54:48 +01:00
|
|
|
- name: Deploy to Netlify
|
|
|
|
env:
|
|
|
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_UI_SITE_ID }}
|
|
|
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
2024-03-16 18:11:30 +01:00
|
|
|
run: pnpm --filter ...@verdaccio/ui-components netlify:ui:deploy
|