From 0ae60ef5e4e9537c7b7b226f212a258a8fc21345 Mon Sep 17 00:00:00 2001 From: VilppeRiskidev Date: Tue, 27 Aug 2024 15:32:17 +0300 Subject: [PATCH] Enable chromatic in CI --- .github/workflows/test.yml | 61 +++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ca3b667ed..9215c2274 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -128,34 +128,33 @@ jobs: - name: Build @thunderstore/cyberstorm-remix run: yarn workspace @thunderstore/cyberstorm-remix build - # Disabled since Storybook is currently broken - # chromatic-deployment: - # runs-on: ubuntu-latest - # needs: ["test", "pre-commit"] - # strategy: - # matrix: - # projects: [ - # { dir: "apps/cyberstorm-storybook", token: "CHROMATIC_CYBERSTORM_TOKEN" }, - # ] - # steps: - # - uses: actions/checkout@v4 - # with: - # fetch-depth: 0 - # - name: Set up Node ${{ needs.get-node-version.outputs.node-version }} - # uses: actions/setup-node@v3 - # with: - # node-version: ${{ needs.get-node-version.outputs.node-version }} - # cache: "yarn" - # - name: Set fontawesome token - # run: | - # npm config set "@fortawesome:registry" https://npm.fontawesome.com/ - # npm config set "//npm.fontawesome.com/:_authToken" ${{ secrets.NPM_FA_TOKEN }} - # - name: Install Yarn dependencies - # run: yarn install --frozen-lockfile - # - name: Publish to Chromatic - # uses: chromaui/action@v1 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # projectToken: ${{ secrets[matrix.projects.token] }} - # workingDir: ${{ matrix.projects.dir }} - # exitOnceUploaded: true + chromatic-deployment: + runs-on: ubuntu-latest + needs: ["test", "pre-commit"] + strategy: + matrix: + projects: [ + { dir: "apps/cyberstorm-storybook", token: "CHROMATIC_CYBERSTORM_TOKEN" }, + ] + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Node ${{ needs.get-node-version.outputs.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ needs.get-node-version.outputs.node-version }} + cache: "yarn" + - name: Set fontawesome token + run: | + npm config set "@fortawesome:registry" https://npm.fontawesome.com/ + npm config set "//npm.fontawesome.com/:_authToken" ${{ secrets.NPM_FA_TOKEN }} + - name: Install Yarn dependencies + run: yarn install --frozen-lockfile + - name: Publish to Chromatic + uses: chromaui/action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + projectToken: ${{ secrets[matrix.projects.token] }} + workingDir: ${{ matrix.projects.dir }} + exitOnceUploaded: true