diff --git a/.github/workflows/pr-preview-build.yml b/.github/workflows/pr-preview-build.yml index db0b617..ba0ad57 100644 --- a/.github/workflows/pr-preview-build.yml +++ b/.github/workflows/pr-preview-build.yml @@ -1,4 +1,4 @@ -name: PR Preview Build +name: PR Preview on: pull_request: @@ -10,4 +10,15 @@ jobs: steps: - uses: gravity-ui/preview-build-action@v2 with: - node-version: 18 \ No newline at end of file + node-version: 18 + deploy: + name: Deploy + needs: build + runs-on: ubuntu-latest + steps: + - uses: gravity-ui/preview-deploy-action@v2 + with: + project: graph + github-token: ${{ secrets.GRAVITY_UI_BOT_GITHUB_TOKEN }} + s3-key-id: ${{ secrets.STORYBOOK_S3_KEY_ID }} + s3-secret-key: ${{ secrets.STORYBOOK_S3_SECRET_KEY }} \ No newline at end of file diff --git a/.github/workflows/pr-preview-deploy.yml b/.github/workflows/pr-preview-deploy.yml deleted file mode 100644 index 775da36..0000000 --- a/.github/workflows/pr-preview-deploy.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: PR Preview Deploy - -on: - workflow_run: - workflows: ['PR Preview Build'] - types: - - completed - -jobs: - deploy: - name: Deploy - if: ${{github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'}} - runs-on: ubuntu-latest - steps: - - uses: gravity-ui/preview-deploy-action@v2 - with: - project: graph - github-token: ${{ secrets.GRAVITY_UI_BOT_GITHUB_TOKEN }} - s3-key-id: ${{ secrets.STORYBOOK_S3_KEY_ID }} - s3-secret-key: ${{ secrets.STORYBOOK_S3_SECRET_KEY }} \ No newline at end of file