Skip to content

Commit 45647f2

Browse files
author
Giacomo Licari
committed
PR Preview: Add Github Action
1 parent c59139c commit 45647f2

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/pr-preview.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: PR-Preview
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- name: Yarn Install and Build
13+
run: |
14+
yarn install
15+
yarn build
16+
17+
- name: Configure AWS Credentials
18+
uses: aws-actions/configure-aws-credentials@v1
19+
with:
20+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
21+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
22+
aws-region: ${{ secrets.AWS_REGION }}
23+
24+
- name: Deploy website to pr-review
25+
run: aws s3 sync ./build/ s3://${{ secrets.AWS_BUCKET_NAME }}/pr-${{ github.event.number }}/ --delete

0 commit comments

Comments
 (0)