diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index 9c36aa3..161cd89 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -13,19 +13,21 @@ jobs: # Job steps steps: - uses: actions/checkout@v3 - # - name: Cache node modules - # id: cache-npm - # uses: actions/cache@v3 - # env: - # cache-name: cache-node-modules - # with: - # # npm cache files are stored in `~/.npm` on Linux/macOS - # path: ~/.npm - # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - # restore-keys: | - # ${{ runner.os }}-build-${{ env.cache-name }}- - # ${{ runner.os }}-build- - # ${{ runner.os }}- + with: + fetch-depth: 0 + - name: Cache node modules + id: cache-npm + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- - uses: actions/checkout@v1 - run: yarn #👇 Adds Chromatic as a step in the workflow @@ -34,21 +36,22 @@ jobs: with: #👇 Chromatic projectToken, see https://storybook.js.org/tutorials/intro-to-storybook/react/en/deploy/ to obtain it projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + exitZeroOnChanges: false build: runs-on: ubuntu-latest needs: chromatic steps: - uses: actions/checkout@v3 - # - name: Get Cached Npm Modules - # uses: actions/cache@v3 - # with: - # path: ~/.npm - # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - # restore-keys: | - # ${{ runner.os }}-build-${{ env.cache-name }}- - # ${{ runner.os }}-build- - # ${{ runner.os }}- + - name: Get Cached Npm Modules + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- - name: Install modules run: | npm install