-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from moheladwy/AddFirstPageInClient
Add first page in client
- Loading branch information
Showing
43 changed files
with
1,796 additions
and
70 deletions.
There are no files selected for viewing
4 changes: 3 additions & 1 deletion
4
.github/workflows/docker-deploy.yml → .github/workflows/docker-dotnet-deploy.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Docker Image Deploy for React Client | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
paths: | ||
- "client/**" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout the code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Set date tag | ||
run: echo "DATE_TAG=$(date +%s)" >> $GITHUB_ENV | ||
|
||
- name: Build the Docker image | ||
run: | | ||
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/todo-client:${{ env.DATE_TAG }} client | ||
- name: Tag the Docker image | ||
run: | | ||
# Tag with timestamp | ||
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/todo-client:${{ env.DATE_TAG }} ${{ secrets.DOCKERHUB_USERNAME }}/todo-client:${{ env.DATE_TAG }} | ||
# Tag as latest | ||
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/todo-client:${{ env.DATE_TAG }} ${{ secrets.DOCKERHUB_USERNAME }}/todo-client:latest | ||
- name: Push the Docker image | ||
run: | | ||
docker push ${{ secrets.DOCKERHUB_USERNAME }}/todo-client:${{ env.DATE_TAG }} | ||
docker push ${{ secrets.DOCKERHUB_USERNAME }}/todo-client:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: React TypeScript Linting | ||
|
||
on: | ||
push: | ||
branches: "**" | ||
paths: | ||
- "client/**" | ||
pull_request: | ||
branches: ["main"] | ||
paths: | ||
- "client/**" | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: client | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
cache: "npm" | ||
cache-dependency-path: client/package-lock.json | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Type check | ||
run: npx tsc --noEmit | ||
|
||
- name: Run ESLint | ||
run: npm run lint | ||
|
||
- name: Build application | ||
run: npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Description: Dockerfile for the client side of the application | ||
FROM node:20-alpine AS base | ||
WORKDIR /Todo | ||
|
||
# Build stage for compiling and publishing the application | ||
FROM base AS build | ||
WORKDIR /Todo/src | ||
COPY package*.json . | ||
RUN npm install | ||
COPY . . | ||
RUN npm run build | ||
|
||
# Final stage with the runtime environment | ||
FROM base AS final | ||
WORKDIR /Todo | ||
COPY --from=build /Todo/src/dist . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Todo Application</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Tasker</title> | ||
</head> | ||
|
||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.