Skip to content

Commit

Permalink
Remove storybook (#4732)
Browse files Browse the repository at this point in the history
* Remove storybook

* Remove storybook

* fix: tsc error

* remove storybook folder & chromatic dep

* remove leftovers

* remove leftovers
  • Loading branch information
krzysztofzuraw authored Mar 19, 2024
1 parent 202b18f commit 470bc89
Show file tree
Hide file tree
Showing 100 changed files with 20,170 additions and 49,973 deletions.
5 changes: 5 additions & 0 deletions .changeset/four-dots-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Remove storybook
75 changes: 2 additions & 73 deletions .github/workflows/pr-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v4
with:
sparse-checkout: ./.github/actions

- name: Generate variables
id: cloud_variables
uses: ./.github/actions/prepare-tests-variables
Expand Down Expand Up @@ -118,77 +118,6 @@ jobs:
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
env: ${{ needs.initialize-cloud.outputs.POOL_NAME }}

deploy-storybook:
if: github.event.pull_request.head.repo.full_name == 'saleor/saleor-dashboard'
runs-on: ubuntu-22.04
needs: initialize-cloud
permissions:
deployments: write
steps:
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"

- name: Start storybook deployment
uses: bobheadxi/deployments@88ce5600046c82542f8246ac287d0a53c461bca3
id: storybook-deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: storybook ${{ needs.initialize-cloud.outputs.POOL_NAME }}
ref: ${{ github.head_ref }}

- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-qa-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-qa-${{ env.cache-name }}-
${{ runner.os }}-qa-
${{ runner.os }}-
- name: Install deps
run: npm ci

- name: Build storybook
run: npm run build-storybook

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}

- name: Deploy to S3
env:
AWS_TEST_DEPLOYMENT_BUCKET: ${{ secrets.AWS_TEST_DEPLOYMENT_BUCKET }}
BASE_URL_DOMAIN: ${{ needs.initialize-cloud.outputs.BASE_URL_DOMAIN }}
run: aws s3 sync ./build/storybook "s3://${AWS_TEST_DEPLOYMENT_BUCKET}/${BASE_URL_DOMAIN}/storybook"

- name: Invalidate cache
env:
AWS_TEST_CF_DIST_ID: ${{ secrets.AWS_TEST_CF_DIST_ID }}
BASE_URL_DOMAIN: ${{ needs.initialize-cloud.outputs.BASE_URL_DOMAIN }}
run: aws cloudfront create-invalidation --distribution-id "$AWS_TEST_CF_DIST_ID" --paths "/${BASE_URL_DOMAIN}/*"

- name: Update storybook deployment status
uses: bobheadxi/deployments@88ce5600046c82542f8246ac287d0a53c461bca3
if: always()
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
env_url: ${{ needs.initialize-cloud.outputs.BASE_URL }}/storybook/index.html
deployment_id: ${{ steps.storybook-deployment.outputs.deployment_id }}
env: storybook ${{ needs.initialize-cloud.outputs.POOL_NAME }}

run-tests:
runs-on: ubuntu-22.04
needs: [initialize-cloud, deploy-dashboard]
Expand All @@ -211,7 +140,7 @@ jobs:
MAILPITURL: ${{ secrets.CYPRESS_MAILPITURL }}

merge-reports:
if: '!cancelled()'
if: "!cancelled()"
needs: run-tests
runs-on: ubuntu-22.04
steps:
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/storybook-chromatic-branch.yml

This file was deleted.

54 changes: 0 additions & 54 deletions .github/workflows/storybook-chromatic-main.yml

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
!.travis*
!.tx
!.husky
!.storybook
!.changeset
*.log
*.pyc
Expand Down
18 changes: 0 additions & 18 deletions .storybook/decorators/CardDecorator.tsx

This file was deleted.

60 changes: 0 additions & 60 deletions .storybook/decorators/MockedProvidersDecorator.tsx

This file was deleted.

10 changes: 0 additions & 10 deletions .storybook/decorators/PaginatorContextDecorator.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions .storybook/decorators/index.ts

This file was deleted.

36 changes: 0 additions & 36 deletions .storybook/helpers/MockedUserProvider.tsx

This file was deleted.

10 changes: 0 additions & 10 deletions .storybook/helpers/formError.ts

This file was deleted.

2 changes: 0 additions & 2 deletions .storybook/helpers/index.ts

This file was deleted.

Loading

0 comments on commit 470bc89

Please sign in to comment.