Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
anys34 committed Aug 27, 2024
2 parents fe02dbd + e73c05d commit dfaa18a
Show file tree
Hide file tree
Showing 14 changed files with 417 additions and 113 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Trigger auto deployment for five

# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ main ]
paths:
- '**'
- '.github/workflows/five-AutoDeployTrigger-4a8745af-1912-43b9-927d-a9d30a2775d3.yml'

# Allow manual trigger
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
id-token: write #This is required for requesting the OIDC JWT Token
contents: read #Required when GH token is used to authenticate with private repo

steps:
- name: Checkout to the branch
uses: actions/checkout@v2

- name: Azure Login
uses: azure/login@v1
with:
client-id: ${{ secrets.FIVE_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.FIVE_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.FIVE_AZURE_SUBSCRIPTION_ID }}

- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}
registryUrl: docker.io
registryUsername: ${{ secrets.FIVE_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.FIVE_REGISTRY_PASSWORD }}
containerAppName: five
resourceGroup: rg-FiveSelves
imageToBuild: anys34/five:${{ github.sha }}
_buildArgumentsKey_: |
_buildArgumentsValues_
5 changes: 4 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,8 @@
"last 1 safari version"
]
},
"packageManager": "pnpm@8.15.5+sha1.a58c038faac410c947dbdb93eb30994037d0fce2"
"packageManager": "pnpm@8.15.5+sha1.a58c038faac410c947dbdb93eb30994037d0fce2",
"devDependencies": {
"@types/react-query": "^1.2.9"
}
}
46 changes: 16 additions & 30 deletions client/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="\manifest" href="%PUBLIC_URL%/manifest.json" />
<meta
name="viewport"
content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width"
Expand Down
11 changes: 8 additions & 3 deletions client/src/components/Product/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,23 @@ interface OwnProps {
image: string;
title: string;
grade: string;
price: string;
price: number;
}

const Product = ({ image, title, grade, price }: OwnProps) => {
const formattedPrice = new Intl.NumberFormat('ko-KR', {
style: 'currency',
currency: 'KRW',
}).format(price);

return (
<_.Product_Layout>
<_.Product_Image src={image} alt="상품" />
<_.Product_Content>
<_.Product_Title>{title}</_.Product_Title>
<_.Product_Grade>{grade}</_.Product_Grade>
<_.Product_Grade>{grade}등급</_.Product_Grade>
</_.Product_Content>
<_.Product_Price>{price}</_.Product_Price>
<_.Product_Price>{formattedPrice}</_.Product_Price>
</_.Product_Layout>
);
};
Expand Down
Empty file removed client/src/lib/apis/.gitkeep
Empty file.
6 changes: 6 additions & 0 deletions client/src/lib/apis/Auth.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { AuthInstance } from './Axios';

export const RefreshAccessToken = async (params: any) => {
const { data } = await AuthInstance.post(`/jwt/`, params);
return data;
};
Loading

0 comments on commit dfaa18a

Please sign in to comment.