Skip to content

chore: test deploy #166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/pr-preview-deploy2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: PR Preview Deploy 2

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:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
github-token: ${{ secrets.GRAVITY_UI_BOT_GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
- name: Extract PR Number
id: pr
run: echo "::set-output name=id::$(<pr/pr-id.txt)"
shell: bash
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.STORYBOOK_S3_KEY_ID }}
aws-secret-access-key: ${{ secrets.STORYBOOK_S3_SECRET_KEY }}
aws-region: ru-central1
- name: Upload to S3
env:
AWS_EC2_METADATA_DISABLED: true
run: aws s3 cp static s3://storybook-static/date-components/pulls/${{ steps.pr.outputs.id }}/ --endpoint-url=https://storage.yandexcloud.net --recursive
shell: bash
- name: Create Comment
uses: marocchino/sticky-pull-request-comment@v2
with:
GITHUB_TOKEN: ${{ secrets.GRAVITY_UI_BOT_GITHUB_TOKEN }}
number: ${{ steps.pr.outputs.id }}
message: '[Preview](https://preview.gravity-ui.com/date-components/${{ steps.pr.outputs.id }}/) is ready.'
Loading