From 7f2eafb38bb9680f97763535a6238c25bfd67a4e Mon Sep 17 00:00:00 2001 From: Amirhossein Alibakhshi Date: Sat, 27 Jul 2024 00:46:05 +0330 Subject: [PATCH] ci: add test --- .github/workflows/deploy-storybook.yaml | 30 ++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-storybook.yaml b/.github/workflows/deploy-storybook.yaml index 6673157..c02d02d 100644 --- a/.github/workflows/deploy-storybook.yaml +++ b/.github/workflows/deploy-storybook.yaml @@ -53,8 +53,36 @@ jobs: with: path: storybook-static - deploy: + test: needs: build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: pnpm/action-setup@v3 + with: + version: 9 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: pnpm + - name: Restore cache + uses: actions/cache@v3 + with: + path: ~/.pnpm-store + key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm- + - name: Install dependencies + run: pnpm install + - name: Run Tests + run: pnpm test + + deploy: + needs: test environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }}