2023-01-02 14:13:45 -05:00
|
|
|
name: UI Components
|
|
|
|
|
2024-03-16 11:54:48 -05:00
|
|
|
on:
|
2024-11-28 04:53:05 -05:00
|
|
|
# pull_request:
|
2024-01-22 02:11:54 -05:00
|
|
|
workflow_dispatch:
|
2024-11-28 04:53:05 -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-11-02 04:02:18 -05:00
|
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
2023-01-02 14:13:45 -05:00
|
|
|
|
2024-11-28 04:53:05 -05:00
|
|
|
- name: Install dependencies with a custom registry
|
|
|
|
uses: ./.github/actions/install-app
|
2023-01-02 14:13:45 -05:00
|
|
|
|
|
|
|
- name: Install pnpm
|
|
|
|
run: |
|
|
|
|
corepack enable
|
2024-11-28 04:53:05 -05:00
|
|
|
corepack prepare
|
2023-01-02 14:13:45 -05:00
|
|
|
- name: Install
|
2024-11-28 04:53:05 -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
|