-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.03 KB
/
deploy-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Publish Docs to Chromatic
on:
workflow_dispatch:
pull_request:
types: [ ready_for_review, synchronize, opened, reopened ]
branches:
- main
push:
branches:
- main
- '**/bugfix/**'
- '**/featured/**'
jobs:
test:
uses: ./.github/workflows/test.yml
publish-docs:
needs: test
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'publish_docs')
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Dependencies
run: npm install
- run: npm ci
- name: build
run: npm run build-storybook
- run: npm run build
name: Publish to Chromatic
- uses: chromaui/action@latest
with:
projectToken: ${{ secrets.PROJECT_CHROMATIC_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
autoAcceptChanges: true