Skip to content

Commit aec4b6a

Browse files
committed
continuous intergration code added
1 parent 186368a commit aec4b6a

File tree

1 file changed

+3
-27
lines changed

1 file changed

+3
-27
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI/CD Pipeline
1+
name: CI Pipeline
22

33
on:
44
push:
@@ -9,7 +9,7 @@ on:
99
- main
1010

1111
jobs:
12-
build:
12+
test:
1313
runs-on: ubuntu-latest
1414

1515
steps:
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up Python
2020
uses: actions/setup-python@v2
2121
with:
22-
python-version: "3.10.11"
22+
python-version: "3.8" # Specify the Python version you need
2323

2424
- name: Install dependencies
2525
run: |
@@ -30,27 +30,3 @@ jobs:
3030
run: |
3131
# You can use pytest or any other testing framework
3232
pytest
33-
34-
deploy:
35-
runs-on: windows-latest
36-
needs: build
37-
if: github.ref == 'refs/heads/main' # Deploy only from the main branch
38-
39-
steps:
40-
- name: Checkout code
41-
uses: actions/checkout@v2
42-
43-
- name: Deploy to Windows Server
44-
run: |
45-
echo "Deploying to the Windows server..."
46-
# Replace the following command with your deployment script
47-
# Example: Using PowerShell to invoke a deployment script
48-
$session = New-PSSession -ComputerName your_server -Credential (Get-Credential)
49-
Invoke-Command -Session $session -ScriptBlock {
50-
cd "C:\path\to\your\app"
51-
git pull
52-
# Optionally restart your Flask service or application
53-
Stop-Service -Name "your_flask_service" -Force
54-
Start-Service -Name "your_flask_service"
55-
}
56-
Remove-PSSession -Session $session

0 commit comments

Comments
 (0)