added codebase, project rules and sec audit
This commit is contained in:
38
NearBeach/.github/workflows/deploy-swagger.yml
vendored
Normal file
38
NearBeach/.github/workflows/deploy-swagger.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Build Swagger and Deploy to Azure Static Web App
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop # or your deployment branch
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-swagger:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 🧾 Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 🐍 Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11' # Match your dev env
|
||||
|
||||
- name: 📦 Install Dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install django django-rest-framework simplejson pillow drf-spectacular drf-spectacular[sidecar] python-dotenv django_otp django-two-factor-auth django-two-factor-auth[phonenumberslite] azure-storage-blob azure-identity botocore boto3 django-rest-knox
|
||||
|
||||
- name: 🔧 Generate Swagger Schema
|
||||
run: |
|
||||
python manage.py spectacular --file swagger/swagger.json
|
||||
|
||||
- name: 🚀 Deploy to Azure Static Web Apps
|
||||
uses: Azure/static-web-apps-deploy@v1
|
||||
with:
|
||||
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
|
||||
action: "upload"
|
||||
skip_app_build: true
|
||||
app_location: "swagger"
|
||||
output_location: "swagger.json"
|
||||
Reference in New Issue
Block a user