Skip to content

Commit 2e96009

Browse files
authored
chore: test deploy (#166)
1 parent 1a57b0b commit 2e96009

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: PR Preview Deploy 2
2+
3+
on:
4+
workflow_run:
5+
workflows: ['PR Preview Build']
6+
types:
7+
- completed
8+
9+
jobs:
10+
deploy:
11+
name: Deploy
12+
if: >
13+
github.event.workflow_run.event == 'pull_request' &&
14+
github.event.workflow_run.conclusion == 'success'
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Download Artifacts
18+
uses: actions/download-artifact@v4
19+
with:
20+
github-token: ${{ secrets.GRAVITY_UI_BOT_GITHUB_TOKEN }}
21+
run-id: ${{ github.event.workflow_run.id }}
22+
- name: Extract PR Number
23+
id: pr
24+
run: echo "::set-output name=id::$(<pr/pr-id.txt)"
25+
shell: bash
26+
- name: Configure AWS Credentials
27+
uses: aws-actions/configure-aws-credentials@v4
28+
with:
29+
aws-access-key-id: ${{ secrets.STORYBOOK_S3_KEY_ID }}
30+
aws-secret-access-key: ${{ secrets.STORYBOOK_S3_SECRET_KEY }}
31+
aws-region: ru-central1
32+
- name: Upload to S3
33+
env:
34+
AWS_EC2_METADATA_DISABLED: true
35+
run: aws s3 cp static s3://storybook-static/date-components/pulls/${{ steps.pr.outputs.id }}/ --endpoint-url=https://storage.yandexcloud.net --recursive
36+
shell: bash
37+
- name: Create Comment
38+
uses: marocchino/sticky-pull-request-comment@v2
39+
with:
40+
GITHUB_TOKEN: ${{ secrets.GRAVITY_UI_BOT_GITHUB_TOKEN }}
41+
number: ${{ steps.pr.outputs.id }}
42+
message: '[Preview](https://preview.gravity-ui.com/date-components/${{ steps.pr.outputs.id }}/) is ready.'

0 commit comments

Comments
 (0)