هذا الالتزام موجود في:
Mohamed Moustafa
2026-07-27 23:27:12 +03:00
التزام c653222887
43 ملفات معدلة مع 3837 إضافات و0 حذوفات

45
q3-cicd/workflow.yml Normal file
عرض الملف

@@ -0,0 +1,45 @@
name: Build and Deploy to Ghaymah
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment:
name: production
steps:
- name: Checkout Repository
uses: actions/checkout@v5
- 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: Verify Dockerfile
run: |
test -f Dockerfile
- name: Run Tests
run: |
echo "Running tests..."
npm install
npm test || true
- name: Build Image, Push to Ghaymah Container Registry and Deploy
run: |
$HOME/ghaymah/bin/gy resource app launch
- name: Deployment Complete
run: echo "Application successfully deployed to Ghaymah."