Skip to content

Create settings.json #6

Create settings.json

Create settings.json #6

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: CI/CD
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install deps
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint (ruff)
run: ruff check . --fix
- name: Run tests
run: pytest -q
deploy:
needs: build-test
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout
uses: actions/checkout@v4
# Sanity check: ensures secret/variable exist at runtime
- name: Check contexts
run: |
echo "AZURE_WEBAPP_NAME=${{ vars.AZURE_WEBAPP_NAME }}"
if [ -z "${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}" ]; then
echo "❌ Missing AZURE_WEBAPP_PUBLISH_PROFILE secret"; exit 1
else
echo "✅ Publish profile secret present"
fi
- name: Azure WebApp Deploy
uses: azure/webapps-deploy@v3
with:
app-name: ${{ vars.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: .