mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-04-21 18:42:23 -06:00
Add action
This commit is contained in:
parent
f55f648479
commit
90b9c0cce0
48
.github/workflows/chromatic.yml
vendored
Normal file
48
.github/workflows/chromatic.yml
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
name: 'Chromatic'
|
||||
|
||||
jobs:
|
||||
chromatic:
|
||||
name: "Chromatic"
|
||||
strategy:
|
||||
matrix:
|
||||
jekyll-version: [4.3]
|
||||
os: [ ubuntu-latest ]
|
||||
ruby-version: [3.1]
|
||||
node-version: [18.x]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
|
||||
# Ruby setup
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup Ruby ${{ matrix.ruby-version }}
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby-version }}
|
||||
bundler-cache: false
|
||||
- name: Bundle Install
|
||||
run: bundle install
|
||||
- name: Install Jekyll ${{ matrix.jekyll-version }}
|
||||
run: gem install jekyll -v ${{ matrix.jekyll-version }}
|
||||
- name: Init Search
|
||||
run: bundle exec rake search:init
|
||||
- name: Build Site
|
||||
run: bundle exec jekyll build
|
||||
|
||||
# Node setup
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm install
|
||||
- run: npm run build-storybook
|
||||
- run: npx chromatic -d storybook-static
|
||||
env:
|
||||
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
Loading…
x
Reference in New Issue
Block a user