Skip to content

KL-176/feat: Link to FeedPage from MainBanner #110

KL-176/feat: Link to FeedPage from MainBanner

KL-176/feat: Link to FeedPage from MainBanner #110

Workflow file for this run

name: Deploy to AWS S3
on:
workflow_dispatch:
inputs:
environment:
type: string
default: manual
required: false
push:
branches:
- main
- KL-176/Banner
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20.15.1'
- name: Setup yarn
run: |
corepack enable
corepack prepare [email protected] --activate
echo "YARN_VERSION=$(yarn -v)" >> $GITHUB_OUTPUT
- name: Install dependencies
run: |
yarn install
- name: Set Environment Variables
env:
VITE_APP_API_URL: ${{ secrets.VITE_APP_API_URL }}
VITE_DEFAULT_IMAGE: ${{ secrets.VITE_DEFAULT_IMAGE }}
run: |
echo "VITE_APP_API_URL=${VITE_APP_API_URL}" >> .env
echo "VITE_DEFAULT_IMAGE=${VITE_DEFAULT_IMAGE}" >> .env
- name: Build project
run: yarn build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Sync Bucket
run: |
aws s3 sync \
--region us-east-1 \
dist s3://klkl-frontend \
--delete \
- name: Create Invalidation
env:
CLOUD_FRONT_ID: ${{ secrets.AWS_CLOUDFRONT_ID}}
run: |
aws cloudfront create-invalidation \
--distribution-id $CLOUD_FRONT_ID --paths "/*"