From 12d589b5e9a3828ba63c53f4ce2cd6a3a22c4e33 Mon Sep 17 00:00:00 2001 From: draedful Date: Fri, 4 Oct 2024 18:52:56 +0300 Subject: [PATCH] another test --- .github/workflows/pr-preview-build.yml | 15 ++------------- .github/workflows/pr-preview-deploy.yml | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/pr-preview-deploy.yml diff --git a/.github/workflows/pr-preview-build.yml b/.github/workflows/pr-preview-build.yml index ba0ad57..db0b617 100644 --- a/.github/workflows/pr-preview-build.yml +++ b/.github/workflows/pr-preview-build.yml @@ -1,4 +1,4 @@ -name: PR Preview +name: PR Preview Build on: pull_request: @@ -10,15 +10,4 @@ jobs: steps: - uses: gravity-ui/preview-build-action@v2 with: - 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 + node-version: 18 \ No newline at end of file diff --git a/.github/workflows/pr-preview-deploy.yml b/.github/workflows/pr-preview-deploy.yml new file mode 100644 index 0000000..74db3e8 --- /dev/null +++ b/.github/workflows/pr-preview-deploy.yml @@ -0,0 +1,22 @@ +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