Skip to content

Commit 76a7343

Browse files
committed
yml file error fix
1 parent a91c445 commit 76a7343

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/main_gymbro.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
2-
# More GitHub Actions for Azure: https://github.com/Azure/actions
3-
# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions
4-
52
name: Build and deploy Python app to Azure Web App - gymbro
63

74
on:
@@ -21,17 +18,23 @@ jobs:
2118
with:
2219
python-version: '3.11'
2320

24-
# Copy all files from backend to a clean working directory
25-
- name: Prepare deployment folder
21+
- name: Create venv and install dependencies
22+
run: |
23+
cd backend
24+
python -m venv antenv
25+
source antenv/bin/activate
26+
pip install -r requirements.txt
27+
28+
- name: Prepare deployment package
2629
run: |
27-
mkdir python-app
28-
rsync -a --exclude='.venv' --exclude='antenv' --exclude='.env' --exclude='__pycache__' --exclude='.pytest_cache' backend/ python-app/
30+
mkdir deploy
31+
rsync -a --exclude='.venv' --exclude='.env' --exclude='__pycache__' --exclude='.pytest_cache' backend/ deploy/
2932
3033
- name: Upload artifact for deployment jobs
3134
uses: actions/upload-artifact@v4
3235
with:
3336
name: python-app
34-
path: python-app/
37+
path: deploy/
3538

3639
deploy:
3740
runs-on: ubuntu-latest
@@ -44,7 +47,6 @@ jobs:
4447
uses: actions/download-artifact@v4
4548
with:
4649
name: python-app
47-
path: .
4850

4951
- name: Login to Azure
5052
uses: azure/login@v2

0 commit comments

Comments
 (0)