Skip to content

remove docker compose version statement as it no longer has any effec… #98

remove docker compose version statement as it no longer has any effec…

remove docker compose version statement as it no longer has any effec… #98

# This Action builds the documentation site in mkdocs
# and pushes it to Azure from where it is deployed
# Azure will also build a preview site for any PRs against LIVE or branches
# https://bawmedical.co.uk/t/763
name: ALL-BRANCHES-ALL-PRs-build-and-deploy-to-azure.yml
on:
push:
branches:
- "**"
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- live
permissions:
contents: write
pull-requests: write # this permission is required in order to allow PR comment with staging URL
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
env:
ENABLE_PDF_EXPORT: 1 # Makes PDF export an option, default disabled, when building locally
ENABLE_GIT_COMMITTERS: True # Makes git-committers an option, default disabled, when building locally
name: Build and Deploy to Azure
steps:
- name: Checkout
uses: actions/checkout@v4 # latest as at March 2024
with:
submodules: true
- name: Setup Python
uses: actions/setup-python@v5 # latest as at March 2024
with:
python-version: "3.12"
- run: pip install -r requirements.txt
- run: mkdocs build
id: builddeploy
- name: Deploy to Azure
uses: Azure/static-web-apps-deploy@v1 # latest as at March 2024
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_NICE_WAVE_0DA909803 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
production_branch: "live"
###### Repository/Build Configurations ######
app_location: "/" # App source code path
api_location: "" # Api source code path - optional
output_location: "site" # Built app content directory - optional
###### End of Repository/Build Configurations ######
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_NICE_WAVE_0DA909803 }}
action: "close"