Skip to content

Merge branch 'main' of https://github.com/spencer-sliffe/KobraStocks #131

Merge branch 'main' of https://github.com/spencer-sliffe/KobraStocks

Merge branch 'main' of https://github.com/spencer-sliffe/KobraStocks #131

# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions
name: Build and deploy Python app to Azure Web App - KobraStocksBackend
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: 'Checkout code'
uses: actions/checkout@v4
- name: 'Set up Python version'
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: 'Install dependencies'
run: |
python -m venv venv
source venv/bin/activate
pip install -r ./Backend/requirements.txt
shell: bash
# Optional: Add step to run tests here (PyTest, Django test suites, etc.)
- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v2
with:
app-name: 'kobrastocks-backend'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_77CAF60E9BEB4121A2C915FE333B9DB1 }}
package: './Backend'