Skip to content

Coding style

Coding style #315

Workflow file for this run

name: Build and Deploy Docs
on:
push:
branches:
- main
- github_wps
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: set git user
run: |
git config --global user.email "umsysteam@metoffice.gov.uk"
git config --global user.name "SSD Developers"
- name: Check out source
uses: actions/checkout@v4
- name: Setup uv
uses: astral-sh/setup-uv@v6
with:
python-version: '3.12'
- name: Install Dependencies
run: uv sync
- name: Lint Docs
run: uv run sphinx-lint source
- name: Build Docs
run: uv run make clean html
- name: commit docs to gh-pages branch
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
run: |
git worktree add ../publish_wps
cd ../publish_wps
git fetch origin gh-pages
git checkout gh-pages
cp -r ../simulation-systems/build/html/. .
git add .
git commit -am "Docs build"
git push -u origin gh-pages