mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-08 23:25:51 +01:00
chore: refactor ui-components ci
This commit is contained in:
parent
70095c994d
commit
a8e906f935
30
.github/workflows/ui-components.yml
vendored
30
.github/workflows/ui-components.yml
vendored
@ -1,7 +1,9 @@
|
||||
name: UI Components
|
||||
|
||||
on:
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
@ -48,24 +50,8 @@ jobs:
|
||||
- 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'
|
||||
- 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:deploy
|
||||
|
@ -16,6 +16,7 @@
|
||||
"build:js": "babel src/ --out-dir build/ --copy-files --no-copy-ignored --extensions \".ts,.tsx\" --source-maps --ignore \"src/**/*.stories.tsx\" --ignore \"src/**/*.test.tsx\" --ignore \"src/**/*.test.ts\"",
|
||||
"watch": "babel src/ --out-dir build/ --watch --copy-files --no-copy-ignored --extensions \".ts,.tsx\" --source-maps --ignore \"src/**/*.stories.tsx\" --ignore \"src/**/*.test.tsx\" --ignore \"src/**/*.test.ts\"",
|
||||
"build": "pnpm run build:js && pnpm run build:types",
|
||||
"netlify:deploy": "npx netlify-cli deploy --dir=./storybook-static --prod",
|
||||
"start": "start-storybook -p 6006 -s ./public",
|
||||
"build-storybook": "build-storybook"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user