-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat update deps #141
Feat update deps #141
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# .github/workflows/chromatic.yml | ||
|
||
name: "Chromatic" | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [production] | ||
types: [opened, synchronize, closed] | ||
|
||
jobs: | ||
chromatic: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install dependencies | ||
run: yarn install --immutable | ||
|
||
- name: Build tailwind | ||
run: yarn tailwind:build | ||
|
||
- name: Run Chromatic | ||
uses: chromaui/action@latest | ||
with: | ||
storybookBaseDir: . | ||
storybookConfigDir: ./.storybook | ||
# ⚠️ Make sure to configure a `CHROMATIC_PROJECT_TOKEN` repository secret | ||
projectToken: ${{ secrets.CHROMATIC_TOKEN }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,65 @@ | ||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: Website | ||
name: Deploy website | ||
|
||
on: | ||
# Runs on pushes targeting the `main` branch. Change this to `master` if you're | ||
# using the `master` branch as the default branch. | ||
push: | ||
branches: [master] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish-pages: | ||
runs-on: ubuntu-latest | ||
needs: deploy-packages | ||
if: ${{ github.event_name != 'pull_request' && (contains(github.ref, 'master') || contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc')) }} | ||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: pages | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
fetch-depth: 0 # Not needed if lastUpdated is not enabled | ||
# - uses: pnpm/action-setup@v2 # Uncomment this if you're using pnpm | ||
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: yarn | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: Release packages | ||
env: | ||
CI: true | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: yarn publish:storybook | ||
run: yarn install | ||
- name: Build with Storybook | ||
run: | | ||
yarn storybook:build | ||
touch ./storybook-static/.nojekyll | ||
echo "formio.tsed.dev" > ./storybook-static/CNAME | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./storybook-static | ||
|
||
# Deployment job | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
needs: build | ||
runs-on: ubuntu-latest | ||
name: Deploy | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ test/*.js.map | |
lib | ||
dist | ||
build | ||
.out | ||
storybook-static | ||
/docs/api | ||
/docs/api/**/*.md | ||
|
||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,36 @@ | ||||||||||||||||||||||||||||||||||||||
import type {StorybookConfig} from "@storybook/react-vite"; | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
const config: StorybookConfig = { | ||||||||||||||||||||||||||||||||||||||
staticDirs: ["../packages/tailwind/build"], | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
stories: [ | ||||||||||||||||||||||||||||||||||||||
"../stories/Getting-started.mdx", | ||||||||||||||||||||||||||||||||||||||
"../stories/**/*.mdx", | ||||||||||||||||||||||||||||||||||||||
"../packages/{tailwind-formio,react-formio}/src/**/*.mdx", | ||||||||||||||||||||||||||||||||||||||
"../packages/{tailwind-formio,react-formio}/src/**/*.stories.@(js|jsx|ts|tsx)", | ||||||||||||||||||||||||||||||||||||||
"../packages/{tailwind-formio,react-formio}/src/**/*.story.@(js|jsx|ts|tsx)" | ||||||||||||||||||||||||||||||||||||||
], | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
addons: [ | ||||||||||||||||||||||||||||||||||||||
"@storybook/addon-a11y", | ||||||||||||||||||||||||||||||||||||||
"@storybook/addon-links", | ||||||||||||||||||||||||||||||||||||||
"@storybook/addon-interactions", | ||||||||||||||||||||||||||||||||||||||
"@storybook/addon-essentials", | ||||||||||||||||||||||||||||||||||||||
"@storybook/addon-mdx-gfm", | ||||||||||||||||||||||||||||||||||||||
"@storybook/addon-links", | ||||||||||||||||||||||||||||||||||||||
"@storybook/addon-interactions", | ||||||||||||||||||||||||||||||||||||||
"@chromatic-com/storybook" | ||||||||||||||||||||||||||||||||||||||
], | ||||||||||||||||||||||||||||||||||||||
Comment on lines
+14
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Remove duplicate addons to avoid potential conflicts. addons: [
"@storybook/addon-a11y",
"@storybook/addon-links",
"@storybook/addon-interactions",
"@storybook/addon-essentials",
"@storybook/addon-mdx-gfm",
- "@storybook/addon-links",
- "@storybook/addon-interactions",
"@chromatic-com/storybook"
], 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
framework: { | ||||||||||||||||||||||||||||||||||||||
name: "@storybook/react-vite", | ||||||||||||||||||||||||||||||||||||||
options: {} | ||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
docs: {}, | ||||||||||||||||||||||||||||||||||||||
typescript: { | ||||||||||||||||||||||||||||||||||||||
reactDocgen: "react-docgen-typescript" | ||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
export default config; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@import "tailwind.css"; | ||
@import "fonts/index.css"; | ||
@import "typography.css"; | ||
@import "../../node_modules/formiojs/dist/formio.full.css"; | ||
@import "../../packages/tailwind-formio/styles/index.css"; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"onlyChanged": true, | ||
"projectId": "Project:676abc3ef2ee519da9b21fb6", | ||
"storybookBaseDir": "packages/storybook", | ||
"zip": true | ||
} |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
The Tailwind build directory path needs to be updated
The current path
../packages/tailwind/build
in.storybook/main.ts
is incorrect. Based on the package.json scripts and build configuration:tailwind:build
script that outputs tobuild/tailwind.css
packages/tailwind/
../packages/tailwind/build
which won't resolve correctlyThe path should be updated to:
./packages/tailwind/build
(relative to the project root)🔗 Analysis chain
Verify the Tailwind build output path
Please ensure the static directory path
../packages/tailwind/build
exists and contains the required Tailwind CSS build output.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 37
Script:
Length of output: 1586
Script:
Length of output: 8755