Skip to content

Commit b77e159

Browse files
Merge pull request #1 from danielmamian99/develop
Add .gitignore, deploy workflow, and update WordleApp with a test header
2 parents 19ac1ae + 4d0b9f6 commit b77e159

4 files changed

Lines changed: 63 additions & 0 deletions

File tree

.DS_Store

2 KB
Binary file not shown.

.github/workflows/deploy.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Deploy Frontend to S3 + CloudFront
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: deploy-production
10+
cancel-in-progress: true
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
cache: yarn
24+
25+
- name: Install dependencies
26+
run: yarn install --frozen-lockfile
27+
28+
- name: Build
29+
run: yarn build
30+
31+
- name: Configure AWS credentials
32+
uses: aws-actions/configure-aws-credentials@v4
33+
with:
34+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
35+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
36+
aws-region: ${{ secrets.AWS_REGION }}
37+
38+
- name: Sync frontend to S3
39+
run: |
40+
aws s3 sync dist s3://${{ secrets.S3_BUCKET }} --delete
41+
42+
- name: Invalidate CloudFront cache
43+
if: env.COULDFRONT_DIST_ID != ''
44+
env:
45+
COULDFRONT_DIST_ID: ${{ secrets.COULDFRONT_DIST_ID }}
46+
run: |
47+
aws cloudfront create-invalidation \
48+
--distribution-id ${{ env.COULDFRONT_DIST_ID }} \
49+
--paths "/*"

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build output
5+
dist/
6+
7+
# Environment
8+
.env
9+
.env.*
10+
11+
# OS / editor
12+
.DS_Store
13+
*.log

src/WordleApp.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export const WordleApp = () => {
2323
(mode === "Dark" ? `bg-[#262B3C] text-white` : "")
2424
}
2525
>
26+
<h1>Deploy Test</h1>
2627
<div className="py-10 w-11/12 sm:w-auto">
2728
{!isLoading ? (
2829
<>

0 commit comments

Comments
 (0)