هذا الالتزام موجود في:
2026-05-06 14:15:17 +02:00
الأصل 7b2f8840cb
التزام 718c52b497
5 ملفات معدلة مع 76 إضافات و0 حذوفات

8
.dockerignore Normal file
عرض الملف

@@ -0,0 +1,8 @@
node_modules
build
.git
.github
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.DS_Store

15
.ghaymah.json Normal file
عرض الملف

@@ -0,0 +1,15 @@
{
"id": "722d126b-c573-40f1-a738-57002876780b",
"name": "cicdproject",
"projectId": "896ba892-9448-4061-97e7-b0506ccc3e3a",
"ports": [{
"expose": true,
"number": 80
}],
"publicAccess": {
"enabled": true,
"domain": "auto"
},
"resourceTier": "t2",
"dockerFileName": "Dockerfile"
}

19
.github/workflows/main.yaml مباع Normal file
عرض الملف

@@ -0,0 +1,19 @@
on:
push:
pull_request:
jobs:
deploy:
needs: build_and_push_image
steps:
- name: checkout code
uses: actions/checkout@v5.0.0
- name: install ghaymah cli
run: curl -sSl https://cli.ghaymah.systems/install.sh | bash
- name: login to ghaymah
run: $HOME/ghaymah/bin/gy auth login --email "${{secrets.GHAYMAH_EMAIL}}" --password "${{secrets.GHAYMAH_PW}}"
- name: deploy
run: $HOME/ghaymah/bin/gy resource app launch

18
Dockerfile Normal file
عرض الملف

@@ -0,0 +1,18 @@
FROM node:20-alpine AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM nginx:1.27-alpine AS runtime
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

16
nginx.conf Normal file
عرض الملف

@@ -0,0 +1,16 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
location /static/ {
expires 1y;
add_header Cache-Control "public, immutable";
}
}