Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 40 additions & 20 deletions .github/workflows/main_queryweaver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,22 @@ jobs:
with:
python-version: '3.12'

- name: Create and start virtual environment
run: |
python -m venv venv
source venv/bin/activate

- name: Install dependencies
run: pip install -r requirements.txt

# Optional: Add step to run tests here (PyTest, Django test suites, etc.)
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'

- name: Install pipenv
run: pip install pipenv

- name: Install dependencies using make
run: make install

- name: Build production assets
run: make build-prod

- name: Generate requirements.txt for production
run: pipenv requirements > requirements.txt

- name: Upload artifact for deployment jobs
uses: actions/upload-artifact@v4
Expand All @@ -41,31 +48,44 @@ jobs:
path: |
.
!venv/
!node_modules/
!.git/
!test-results/
!playwright-report/
!tests/e2e/screenshots/
!__pycache__/
!Pipfile
!Pipfile.lock

deploy:
runs-on: ubuntu-latest
needs: build
permissions:
id-token: write #This is required for requesting the JWT
contents: read #This is required for actions/checkout
permissions:
id-token: write #This is required for requesting the JWT
contents: read #This is required for actions/checkout

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: python-app

- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_5A92CE0E3729470284DEBEC07BD71572 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_1EB63FFB73BB453DA5FC60781960C9E5 }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_5288D7A76CF3435AAEF4F034A1024F79 }}

- name: Set up Python version
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_5A92CE0E3729470284DEBEC07BD71572 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_1EB63FFB73BB453DA5FC60781960C9E5 }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_5288D7A76CF3435AAEF4F034A1024F79 }}

- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v3
id: deploy-to-webapp
with:
app-name: 'queryweaver'
slot-name: 'Production'

startup-command: 'python -m uvicorn api.index:app --host 0.0.0.0 --port $PORT'
Loading