Skip to content

Commit 111ee61

Browse files
committed
2 parents e8a9021 + b405b45 commit 111ee61

File tree

14 files changed

+67
-2
lines changed

14 files changed

+67
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: MAIN CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
Deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout source code
14+
uses: actions/checkout@v3
15+
16+
- name: Install pnpm
17+
run: |
18+
npm install -g pnpm
19+
20+
- name: Get pnpm store path
21+
id: pnpm-cache-path
22+
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_ENV
23+
24+
- name: Cache pnpm modules
25+
id: cache
26+
uses: actions/cache@v3
27+
with:
28+
path: ${{ env.STORE_PATH }}
29+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
30+
restore-keys: |
31+
${{ runner.os }}-pnpm-
32+
${{ runner.os }}-
33+
34+
- name: Install Dependencies
35+
run: |
36+
pnpm install --frozen-lockfile
37+
pnpm store prune
38+
39+
- name: Set up .env file
40+
run: |
41+
echo "VITE_API_URL=${{ secrets.VITE_API_URL }}" > .env.production
42+
echo "HTTPS=true" >> .env.production
43+
44+
- name: Build
45+
run: pnpm run build
46+
47+
- name: Configure AWS Credentials
48+
uses: aws-actions/configure-aws-credentials@v2
49+
with:
50+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
51+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
52+
aws-region: ${{ secrets.AWS_REGION }}
53+
54+
- name: Deploy to S3
55+
run: aws s3 sync ./dist s3://${{ secrets.AWS_BUCKET_NAME }} --delete
56+
57+
- name: Invalidate CloudFront Cache
58+
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_DISTRIBUTION_ID }} --paths "/*"
278 KB
Loading

src/assets/images/field-4-dark.png

266 KB
Loading
2.04 KB
Loading
530 KB
Loading
247 KB
Loading
544 KB
Loading

src/assets/images/landing-dark.png

1.41 MB
Loading

src/layouts/PrivateRoute.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { useServerSentEvents } from '@/hooks/useServerSentEvents';
66
import Toast from '@/components/Toast';
77

88
export default function PrivateRoute() {
9+
useServerSentEvents();
910
const isLoggedIn = useAuthStore((state) => state.isLoggedIn);
1011
const navigate = useNavigate();
1112

src/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
2-
import { StrictMode } from 'react';
2+
// import { StrictMode } from 'react';
33
import { createRoot } from 'react-dom/client';
44
import { BrowserRouter } from 'react-router';
55

0 commit comments

Comments
 (0)