Merge pull request #517 from rcpch/perms-tests #146
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
# DEPLOYS CHANGES IN THE 'DEVELOPMENT' BRANCH TO THE 'DEVELOPMENT' AZURE WEBAPP | |
# epilepsy12/development | |
name: Build and deploy Python app to Azure Web App - epilepsy12 | |
on: | |
push: | |
branches: | |
- development | |
workflow_dispatch: | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
environment: | |
name: 'development' | |
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: List all files | |
run: ls -al | |
- name: Set up Python version | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install PostGIS dependencies | |
run: sudo apt-get install -y binutils libproj-dev gdal-bin libgdal-dev python3-gdal | |
- name: Create and start virtual environment | |
run: | | |
python -m venv venv | |
source venv/bin/activate | |
# python dependencies | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: collect static files | |
run: python manage.py collectstatic --noinput | |
# Deploy to Azure | |
- name: 'Deploy to Azure Web App' | |
uses: azure/webapps-deploy@v2 | |
id: deploy-to-webapp | |
with: | |
app-name: 'epilepsy12-development' | |
slot-name: 'Production' | |
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_F43DF2B15BBA4BC09CB85DE9AECC20D5 }} | |
package: . |