Skip to content

Commit 0045379

Browse files
Elidwr-psandhu
authored andcommitted
fixed github actions for sphinx build
1 parent e9db4a6 commit 0045379

3 files changed

Lines changed: 19 additions & 26 deletions

File tree

.github/workflows/build_sphinx.yml

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,55 @@
11
name: "Sphinx: Render docs"
22

33
on:
4-
# Runs on pushes targeting the default branch
54
push:
65
branches: ["main", "master"]
7-
8-
# Allows you to run this workflow manually from the Actions tab
96
workflow_dispatch:
107

11-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
128
permissions:
139
contents: write
1410
pages: write
1511
id-token: write
1612

17-
18-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2013
concurrency:
2114
group: "pages"
2215
cancel-in-progress: false
2316

2417
jobs:
25-
# This workflow contains a single job called "build"
2618
build:
27-
28-
# The type of runner that the job will run on
2919
runs-on: ubuntu-latest
30-
31-
# Steps represent a sequence of tasks that will be executed as part of the job
3220
steps:
33-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
3421
- uses: actions/checkout@v2
35-
36-
- name: Set up Python 3.10
22+
with:
23+
fetch-depth: 0
24+
- name: Set up Python 3.9
3725
uses: actions/setup-python@v2
3826
with:
39-
python-version: "3.10"
40-
41-
- name: Install dependencies
27+
python-version: 3.9
28+
- name: Add conda to system path
29+
run: |
30+
echo $CONDA/bin >> $GITHUB_PATH
31+
- name: Conda build env for docs
4232
run: |
43-
python -m pip install --upgrade pip
33+
conda env create -f schimpy_env.yml
34+
source $CONDA/etc/profile.d/conda.sh
35+
conda activate schimpy
4436
pip install -r docsrc/requirements.txt
45-
4637
- name: Build HTML
4738
run: |
39+
source $CONDA/etc/profile.d/conda.sh
40+
conda activate schimpy
4841
cd docsrc/
42+
sphinx-apidoc --force -o . ../schimpy
43+
make clean
4944
make html
50-
5145
- name: Run ghp-import
5246
shell: bash
5347
env:
5448
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5549
run: |
50+
source $CONDA/etc/profile.d/conda.sh
51+
conda activate schimpy
5652
git config http.postBuffer 157286400
5753
git pull
58-
5954
tree -L 2 -a
60-
6155
ghp-import -n -p -f ./docs/html

schimpy_env.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This environment is a functional analysis environment for schimpy.
22
# However the standard monolity for Bay-Delta SCHISM is schism_env.yml in the BayDeltaSCHISM package
33
# https://github.com/CADWRDeltaModeling/BayDeltaSCHISM
4-
name: schimpy
4+
name: schimpy
55
channels:
66
- conda-forge # Note: the order listed in yaml is not enforced by conda
77
- defaults # For predictable behavior, set your conda config
@@ -36,4 +36,3 @@ dependencies:
3636
# - "--editable=git+https://github.com/CADWRDeltaModeling/vtools3#egg=vtools3"
3737
# - "--editable=git+https://github.com/CADWRDeltaModeling/schimpy#egg=schimpy"
3838
# - "--editable=git+https://github.com/CADWRDeltaModeling/dms_datastore#egg=dms_datastore"
39-

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"geopandas",
1717
'vtools3>=3.8', # moved unit_conversions to vtools, so dependent on the version where we did that
1818
"gdal",
19-
"libgdal", # libgdal is for calling gdal_translate in clip_dems
19+
#"libgdal", # libgdal is for calling gdal_translate in clip_dems
2020
"xarray",
2121
"netcdf4",
2222
"scipy",

0 commit comments

Comments
 (0)