diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f2fa56e06..854e05397 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -88,51 +88,3 @@ jobs: exitOnceUploaded: true autoAcceptChanges: true projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} - - deploy-docs: - name: 'Deploy Latest documentation' - needs: publish - if: needs.publish.outputs.published == 'true' - runs-on: ubuntu-latest - environment: - name: Docs Production - url: ${{ steps.publish_docs.outputs.NETLIFY_PREVIEW_URL }} - env: - NODE_OPTIONS: --max-old-space-size=4096 - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - steps: - - uses: actions/checkout@v2 - - - name: Install pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - - uses: actions/cache@v2 - name: Download storybook cache - with: - path: | - **/node_modules/.cache - key: ${{ runner.os }}-storybook-${{ github.run_id }} - restore-keys: | - ${{ runner.os }}-storybook - - - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'pnpm' - - - name: Install dependencies - run: pnpm install - - - name: Build Docs - run: pnpm build-docs --quiet - - - name: Deploy docs to Netlify - uses: South-Paw/action-netlify-deploy@v1.2.1 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }} - netlify-site-id: ${{ secrets.NETLIFY_SITE_ID }} - build-dir: ./storybook-docs diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 525fd0448..b2806e3ad 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -163,68 +163,3 @@ jobs: repo: context.repo, prNumber: context.payload.pull_request.number }) - - deploy-docs: - name: 'Prepare Docs for the Review' - runs-on: ubuntu-latest - environment: - name: Docs staging - url: ${{ steps.publish_docs.outputs.preview-url }} - env: - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - steps: - - uses: actions/checkout@v2 - - - name: Install pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - - uses: actions/cache@v2 - name: Download storybook cache - with: - path: | - **/node_modules/.cache - key: ${{ runner.os }}-storybook-${{ github.run_id }} - restore-keys: | - ${{ runner.os }}-storybook - - - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'pnpm' - - - name: Install dependencies - run: pnpm install - - - name: Build Docs - run: pnpm build-docs --quiet - - - name: Deploy docs to Netlify - id: publish_docs - uses: South-Paw/action-netlify-deploy@v1.2.1 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }} - netlify-site-id: ${{ secrets.NETLIFY_SITE_ID }} - draft: true - build-dir: ./storybook-docs - comment-on-commit: true - - - name: Comment PR - uses: actions/github-script@v6 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const setMessage = require('${{ github.workspace }}/scripts/ci/set-message') - - await setMessage({ - header: "## 🏗 Docs are successfully deployed!", - body: ` - 👀 Preview: ${{ steps.publish_docs.outputs.preview-url }} - `, - github, - repo: context.repo, - prNumber: context.payload.pull_request.number - }) diff --git a/package.json b/package.json index 31521d1bc..258864558 100644 --- a/package.json +++ b/package.json @@ -124,6 +124,7 @@ "storybook": "^7.0.17", "tiny-invariant": "^1.3.1", "valid-url": "^1.0.9", + "vercel-action@v20": "link:amondnet/vercel-action@v20", "vite": "^4.3.5" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ab02bbe3c..b902edbf4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,5 +1,9 @@ lockfileVersion: '6.0' +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + overrides: '@testing-library/user-event': 14.2.0 @@ -208,6 +212,9 @@ dependencies: valid-url: specifier: ^1.0.9 version: 1.0.9 + vercel-action@v20: + specifier: link:amondnet/vercel-action@v20 + version: link:amondnet/vercel-action@v20 vite: specifier: ^4.3.5 version: 4.3.5(@types/node@18.14.0)