Skip to content

Commit

Permalink
Merge pull request #60 from rcpch:eatyourpeas/issue49
Browse files Browse the repository at this point in the history
deploy-docs-gh-pages
  • Loading branch information
eatyourpeas authored Dec 22, 2024
2 parents 796ea17 + 6a6d61a commit 693b4a5
Showing 1 changed file with 56 additions and 3 deletions.
59 changes: 56 additions & 3 deletions .github/workflows/main_rcpch-nhs-organisations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@
# 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 - rcpch-nhs-organisations
name: Build and deploy Python app to Azure Web App - rcpch-nhs-organisations. Deploy docs to GitHub Pages

on:
push:
pull_request:
branches:
- live
workflow_dispatch:
types:
- closed

jobs:
build-and-deploy:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
Expand All @@ -33,3 +35,54 @@ jobs:
app-name: "RCPCH-NHS-organisations"
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_A76B7421A08D44778EBB49AB30B51B3D }}
package: "."

deploy-mkdocs:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
needs: build-and-deploy

steps:
- uses: actions/checkout@v4

- name: Set up Python version
uses: actions/setup-python@v1
with:
python-version: "3.11"

- name: Install MkDocs and dependencies
run: |
pip install mkdocs mkdocs-material
- name: Build MkDocs site
run: mkdocs build --config-file documentation/mkdocs.yml

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site

deploy-mkdocs-only:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.title, '[docs]')
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python version
uses: actions/setup-python@v1
with:
python-version: "3.11"

- name: Install MkDocs and dependencies
run: |
pip install mkdocs mkdocs-material
- name: Build MkDocs site
run: mkdocs build --config-file documentation/mkdocs.yml

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site

0 comments on commit 693b4a5

Please sign in to comment.