Skip to content

Commit

Permalink
PR Preview: Add Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
Giacomo Licari committed Sep 4, 2023
1 parent c59139c commit 45647f2
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: PR-Preview

on:
pull_request:
branches: [ main ]

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Yarn Install and Build
run: |
yarn install
yarn build
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Deploy website to pr-review
run: aws s3 sync ./build/ s3://${{ secrets.AWS_BUCKET_NAME }}/pr-${{ github.event.number }}/ --delete

0 comments on commit 45647f2

Please sign in to comment.