Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 016b259da0 | |||
| bb789e443e |
@@ -0,0 +1,46 @@
|
||||
|
||||
name: Push nuget and docker image Actions Workflow
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- stage-new
|
||||
jobs:
|
||||
Deploy:
|
||||
runs-on: windows
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://git.afrino.co/actions/checkout@v3
|
||||
- name: Setup dotnet
|
||||
uses: https://git.afrino.co/actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 7.0.x
|
||||
|
||||
- name: Remove Package Source
|
||||
run: dotnet nuget remove source FourSat
|
||||
continue-on-error: true
|
||||
- name: Add Package Source
|
||||
run: dotnet nuget add source --name FourSat --username systemuser --password sZSA7PTiv3pUSQZ https://git.afrino.co/api/packages/FourSat/nuget/index.json --store-password-in-clear-text
|
||||
|
||||
- name: Install dependencies
|
||||
run: dotnet restore ".\src\FrontOffice.Main\FrontOffice.Main.csproj"
|
||||
- name: Build
|
||||
run: dotnet build ".\src\FrontOffice.Main\FrontOffice.Main.csproj" --configuration Release --no-restore
|
||||
- name: Test
|
||||
run: dotnet test ".\src\FrontOffice.Main\FrontOffice.Main.csproj" --no-restore --verbosity normal
|
||||
- name: Recycle Apppool
|
||||
run: |
|
||||
& "C:\Windows\System32\inetsrv\appcmd.exe" recycle apppool /apppool.name:kbs1.ir
|
||||
shell: powershell
|
||||
- name: Stop Website
|
||||
run: |
|
||||
& "C:\Windows\System32\inetsrv\appcmd.exe" stop site /site.name:kbs1.ir
|
||||
shell: powershell
|
||||
- name: Publish
|
||||
run: dotnet publish ".\src\FrontOffice.Main\FrontOffice.Main.csproj" -c Release -o publish
|
||||
- name: Copy Publish To IIS Directory
|
||||
run: Get-ChildItem -Path "publish\*" | Copy-Item -Destination "E:\kbs1.ir\kbs1.ir\" -Recurse -Force
|
||||
- name: Start Website
|
||||
run: |
|
||||
& "C:\Windows\System32\inetsrv\appcmd.exe" start site /site.name:kbs1.ir
|
||||
shell: powershell
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
done
|
||||
|
||||
if ! docker info >/dev/null 2>&1; then
|
||||
echo "❌ Docker daemon failed to start"
|
||||
echo "❌ Docker daemon failed to start after 3 minutes"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -56,10 +56,9 @@ jobs:
|
||||
- name: Build Docker Image
|
||||
run: |
|
||||
cd src
|
||||
DOCKER_BUILDKIT=0 docker build --network host -f FrontOffice.Main/Dockerfile \
|
||||
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} \
|
||||
DOCKER_BUILDKIT=0 docker build --network host -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} \
|
||||
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:prod \
|
||||
.
|
||||
-f FrontOffice.Main/Dockerfile .
|
||||
|
||||
- name: Push to Registry
|
||||
run: |
|
||||
|
||||
@@ -131,7 +131,10 @@
|
||||
|
||||
@* ═══════════════════════════════════════════════
|
||||
2. HOW IT WORKS — 3 numbered steps
|
||||
(appsettings Landing:ShowStepsSection; default false)
|
||||
═══════════════════════════════════════════════ *@
|
||||
@if (_showStepsSection)
|
||||
{
|
||||
<section class="section-landing">
|
||||
<MudContainer MaxWidth="MaxWidth.Large">
|
||||
<div class="text-center mb-8 fade-in-up">
|
||||
@@ -157,10 +160,14 @@
|
||||
</MudGrid>
|
||||
</MudContainer>
|
||||
</section>
|
||||
}
|
||||
|
||||
@* ═══════════════════════════════════════════════
|
||||
3. FEATURES — 6 cards with icons
|
||||
(appsettings Landing:ShowFeaturesSection; default false)
|
||||
═══════════════════════════════════════════════ *@
|
||||
@if (_showFeaturesSection)
|
||||
{
|
||||
<section class="section-landing" style="background:var(--mud-palette-background-gray);">
|
||||
<MudContainer MaxWidth="MaxWidth.Large">
|
||||
<div class="text-center mb-8 fade-in-up">
|
||||
@@ -188,6 +195,7 @@
|
||||
</MudGrid>
|
||||
</MudContainer>
|
||||
</section>
|
||||
}
|
||||
|
||||
@* ═══════════════════════════════════════════════
|
||||
4. STATS — Counter cards
|
||||
|
||||
@@ -21,6 +21,8 @@ public partial class Index : IDisposable
|
||||
|
||||
private bool _isAuthenticated;
|
||||
private string _twentyCardPortalUrl = string.Empty;
|
||||
private bool _showStepsSection;
|
||||
private bool _showFeaturesSection;
|
||||
|
||||
// ── CMS page data ──
|
||||
private PageSettingsDto? _pageData;
|
||||
@@ -53,6 +55,9 @@ public partial class Index : IDisposable
|
||||
MainService.OnChangeHandler += OnStateChanged;
|
||||
_isAuthenticated = await AuthService.IsAuthenticatedAsync();
|
||||
_twentyCardPortalUrl = Configuration["TwentyCard:CreditPortalUrl"] ?? string.Empty;
|
||||
// appsettings Landing:* — default false (hidden). Set true to restore sections.
|
||||
_showStepsSection = Configuration.GetValue("Landing:ShowStepsSection", false);
|
||||
_showFeaturesSection = Configuration.GetValue("Landing:ShowFeaturesSection", false);
|
||||
|
||||
// Load landing page settings from CMS
|
||||
try
|
||||
@@ -344,8 +349,10 @@ public partial class Index : IDisposable
|
||||
public string? HeroButtonPrimaryText { get; set; }
|
||||
public string? HeroButtonSecondaryText { get; set; }
|
||||
public List<TrustBadgeItem>? TrustBadges { get; set; }
|
||||
public bool? StepsEnabled { get; set; }
|
||||
public string? StepsTitle { get; set; }
|
||||
public List<StepItem>? Steps { get; set; }
|
||||
public bool? FeaturesEnabled { get; set; }
|
||||
public string? FeaturesTitle { get; set; }
|
||||
public List<FeatureItem>? Features { get; set; }
|
||||
public string? StatsTitle { get; set; }
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<MudDivider Class="my-4" />
|
||||
|
||||
<MudText Typo="Typo.body2" Color="Color.Secondary">
|
||||
موجودی کیف پول اصلی: @FormatPrice(_walletBalance)
|
||||
موجودی کیف پول: @FormatPrice(_walletBalance)
|
||||
</MudText>
|
||||
|
||||
<MudButton Color="Color.Primary" Variant="Variant.Filled" Class="mt-6"
|
||||
|
||||
@@ -45,9 +45,6 @@
|
||||
Href="https://wa.me/989123456789"
|
||||
Target="_blank" />
|
||||
</MudStack>
|
||||
<MudStack Row="true" Spacing="2" Class="enamad">
|
||||
<a referrerpolicy='origin' target='_blank' href='https://trustseal.enamad.ir/?id=688255&Code=uoMRGkyUYHAtMxkpBLB0KyPL5Ac66ACX'><img referrerpolicy='origin' src='https://trustseal.enamad.ir/logo.aspx?id=688255&Code=uoMRGkyUYHAtMxkpBLB0KyPL5Ac66ACX' alt='' style='cursor:pointer' code='uoMRGkyUYHAtMxkpBLB0KyPL5Ac66ACX'></a>
|
||||
</MudStack>
|
||||
</MudStack>
|
||||
</MudItem>
|
||||
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{
|
||||
"GwUrl": "https://cms.kbs2.ir",
|
||||
"GwUrl": "https://cms.kbs1.ir",
|
||||
"DownloadUrl": "",
|
||||
"TwentyCard": {
|
||||
"CreditPortalUrl": "https://userpanel.20card.ir/"
|
||||
},
|
||||
"Landing": {
|
||||
"ShowStepsSection": false,
|
||||
"ShowFeaturesSection": false
|
||||
},
|
||||
"EncryptionSettings": {
|
||||
"Key": "kmcQ3XTmH4mrdh8VHziuscyf8LLYjG//Kyni81nH/0E=",
|
||||
"IV": "1wyF3Tt142MOkCpIyCxh/g=="
|
||||
@@ -14,10 +21,5 @@
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"Seo": {
|
||||
"SiteUrl": "https://kbs2.ir",
|
||||
"SiteName": "کارابازار سلامت",
|
||||
"DefaultDescription": "باشگاه مشتریان کارابازار سلامت (KBS) — فروشگاه محصولات سلامت، پاداش شفاف، کیف پول و شبکه فروش."
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
"TwentyCard": {
|
||||
"CreditPortalUrl": "https://userpanel.20card.ir/"
|
||||
},
|
||||
"Landing": {
|
||||
"ShowStepsSection": false,
|
||||
"ShowFeaturesSection": false
|
||||
},
|
||||
"EncryptionSettings": {
|
||||
"Key": "kmcQ3XTmH4mrdh8VHziuscyf8LLYjG//Kyni81nH/0E=",
|
||||
"IV": "1wyF3Tt142MOkCpIyCxh/g=="
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
"TwentyCard": {
|
||||
"CreditPortalUrl": "https://userpanel.20card.ir/"
|
||||
},
|
||||
"Landing": {
|
||||
"ShowStepsSection": false,
|
||||
"ShowFeaturesSection": false
|
||||
},
|
||||
"EncryptionSettings": {
|
||||
"Key": "kmcQ3XTmH4mrdh8VHziuscyf8LLYjG//Kyni81nH/0E=",
|
||||
"IV": "1wyF3Tt142MOkCpIyCxh/g=="
|
||||
|
||||
Reference in New Issue
Block a user