Skip to content
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

Ci/chromatic #98

Merged
merged 4 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 30 additions & 11 deletions .github/workflows/chromatic-vctrl-viewer.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,49 @@
name: Publish vctrl/viewer Storybook to Chromatic

on:
push:
branches:
- main
#exclude dependabot and renovate branches
on: push

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-chromatic
cancel-in-progress: true

permissions:
actions: write
contents: read

jobs:
chromatic:
name: Run Chromatic
runs-on: ubuntu-22.04
name: Chromatic
runs-on: ubuntu-20.04
environment: chromatic-publishing

steps:
- name: Checkout code
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
cache: npm
cache-dependency-path: ./package.json
node-version: 20

- name: Install dependencies
run: npm ci
- name: 📥 Install deps
run: npm install

- name: Build Storybook
run: npx nx build-storybook vctrl/viewer

- name: Run Chromatic
- name: Run chromatic
uses: chromaui/action@latest
# Chromatic GitHub Action options
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN_1 }}
workingDir: packages/viewer
autoAcceptChanges: 'main'
exitZeroOnChanges: true
exitOnceUploaded: true
onlyChanged: true
skip: '@(renovate/**|dependabot/**)'
4 changes: 4 additions & 0 deletions .github/workflows/deploy-official-website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
- 'package*.json'
- '.github/workflows/deploy-official-website.yaml'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
GCR_HOSTNAME: gcr.io
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
Expand Down
2 changes: 1 addition & 1 deletion packages/viewer/src/vectreal-viewer.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ type Story = StoryObj<typeof meta>;
export const Default: Story = {
args: {
cameraOptions: defaultCameraOptions,
controlsOptions: defaultControlsOptions,
controlsOptions: { ...defaultControlsOptions, autoRotate: false },
envOptions: defaultEnvOptions,
gridOptions: defaultGridOptions,
infoPopoverOptions: defaultInfoPopoverProps,
Expand Down