From f3c2924fee50efd9eb21e318a65d7730c2c6c4d0 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Fri, 6 Dec 2024 14:35:26 +0900 Subject: [PATCH] =?UTF-8?q?env(yml):=20chromatic=20yml=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/chromatic.yml | 45 +++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/chromatic.yml diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml new file mode 100644 index 0000000..bff2e0a --- /dev/null +++ b/.github/workflows/chromatic.yml @@ -0,0 +1,45 @@ +name: 'Chromatic Deployment' + +on: + push: + branches: + - '**' + +jobs: + chromatic: + name: 'Run Chromatic' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + + # Yarn Berry 캐시 설정 + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT + + - name: Yarn Cache + uses: actions/cache@v3 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: yarn-cache-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + yarn-cache- + + - name: Install dependencies + run: | + yarn install + yarn dlx @yarnpkg/sdks vscode + + - name: Publish to Chromatic + uses: chromaui/action@latest + with: + projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + workingDir: packages/ui + exitZeroOnChanges: true # optional, prevent CI failing on changes \ No newline at end of file