Skip to content

[docs]: Fixes and deployment to gh-pages #1

[docs]: Fixes and deployment to gh-pages

[docs]: Fixes and deployment to gh-pages #1

Workflow file for this run

name: Deploy Sphinx Docs to GitHub Pages
on:
pull_request:
branches:
- main # Trigger on pull requests targeting main
workflow_run:
workflows:
- ICON4Py Quality Assurance
types:
- completed
workflow_dispatch: # Allow manual triggering
jobs:
build:
name: Deploy Sphinx Documentation
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3
# Step 2: Restore Python dependencies
- name: Restore Python dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# Step 3: Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
# Step 4: Build Sphinx documentation
- name: Build documentation
run: |
cd model/atmosphere/dycore/docs
make html
# Step 5: Deploy to GitHub Pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: model/atmosphere/dycore/docs/_build/html