-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add storybook build log to gitignore * Add chromatic to the deps * Add chromatic workflow to CI
- Loading branch information
1 parent
3ec87c3
commit a8eaf04
Showing
4 changed files
with
1,049 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -274,6 +274,56 @@ jobs: | |
- name: Run JS tests | ||
run: cd assets && npm test | ||
|
||
chromatic: | ||
name: Chromatic deployment | ||
needs: [elixir-deps, npm-deps] | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup | ||
uses: erlef/setup-beam@v1 | ||
with: | ||
elixir-version: ${{ env.ELIXIR_VERSION }} | ||
otp-version: ${{ env.OTP_VERSION }} | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Retrieve Cached Dependencies | ||
uses: actions/cache@v3 | ||
id: mix-cache | ||
with: | ||
path: | | ||
deps | ||
_build/test | ||
priv/plts | ||
key: ${{ runner.os }}-${{ env.OTP_VERSION }}-${{ env.ELIXIR_VERSION }}-${{ hashFiles('mix.lock') }} | ||
- name: Retrieve NPM Cached Dependencies | ||
uses: actions/cache@v3 | ||
id: npm-cache | ||
with: | ||
path: | | ||
assets/node_modules | ||
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ hashFiles('assets/package-lock.json') }} | ||
- name: Build CSS | ||
run: npx tailwindcss --input=css/app.css --output=../priv/static/assets/app.css --postcss | ||
working-directory: assets | ||
- name: Build Frontend | ||
run: npm run build | ||
working-directory: assets | ||
- name: Publish to Chromatic | ||
uses: chromaui/action@v1 | ||
with: | ||
workingDir: assets | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
|
||
npm-e2e-deps: | ||
name: Npm E2E dependencies | ||
runs-on: ubuntu-20.04 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.