better github action for chromatic
This commit is contained in:
parent
eaf144e0b5
commit
e01ec8372b
3 changed files with 19 additions and 8 deletions
18
.github/workflows/chromatic.yaml
vendored
Normal file
18
.github/workflows/chromatic.yaml
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
name: Chromatic
|
||||||
|
|
||||||
|
on: push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
chromatic-deployment:
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn
|
||||||
|
- name: Publish to Chromatic
|
||||||
|
uses: chromaui/action@v1
|
||||||
|
with:
|
||||||
|
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
||||||
|
buildScriptName: build:docs
|
||||||
6
.github/workflows/release.yaml
vendored
6
.github/workflows/release.yaml
vendored
|
|
@ -63,9 +63,3 @@ jobs:
|
||||||
git add .
|
git add .
|
||||||
git commit -m "published ${{ github.ref_name }}"
|
git commit -m "published ${{ github.ref_name }}"
|
||||||
git push
|
git push
|
||||||
|
|
||||||
- id: publish-chromatic
|
|
||||||
name: Chromatic
|
|
||||||
run: npm run chromatic
|
|
||||||
env:
|
|
||||||
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,7 @@
|
||||||
"build:docs": "storybook build -o docs && touch ./docs/.nojekyll",
|
"build:docs": "storybook build -o docs && touch ./docs/.nojekyll",
|
||||||
"build": "npm-run-all build:package build:docs",
|
"build": "npm-run-all build:package build:docs",
|
||||||
"prepublishOnly": "npm run build:package",
|
"prepublishOnly": "npm run build:package",
|
||||||
"postversion": "git push origin && git push origin --tags",
|
"postversion": "git push origin && git push origin --tags"
|
||||||
"chromatic": "npx chromatic --build-script-name build:docs"
|
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"types": "./dist/@types/index.d.ts",
|
"types": "./dist/@types/index.d.ts",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue