Skip to content

seperated home modules into many modules (#48) #26

seperated home modules into many modules (#48)

seperated home modules into many modules (#48) #26

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches:
- 'main'
jobs:
ci:
runs-on: ubuntu-latest
env:
VITE_GOOGLE_MAPS_API_KEY: ${{ secrets.VITE_GOOGLE_MAPS_API_KEY }}
VITE_API_URL: ${{ secrets.VITE_API_URL }}
strategy:
matrix:
node-version: ['22.x']
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Run Lint
run: npm run lint
- name: Build Project
run: npm run build
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: ./dist
cd:
runs-on: ubuntu-latest
needs: ci
steps:
- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
name: build-artifacts
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
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: Deploy to S3
run: aws s3 sync . s3://${{ secrets.AWS_S3_BUCKET_NAME }} --delete
- name: Invalidate CloudFront Cache
run: |
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"