-
Notifications
You must be signed in to change notification settings - Fork 7
52 lines (45 loc) · 1.36 KB
/
build_doc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Doc Build
run-name: ${{ github.actor }} is building doc
on:
- push
- workflow_dispatch
jobs:
Sole_job_yet:
name: Build doc
runs-on: ubuntu-20.04
defaults:
run:
shell: bash -el {0}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: climaf_test
use-mamba: true
- name: Cache Conda env
uses: actions/cache@v4
with:
path: ${{ env.CONDA }}/envs
key:
conda-${{ runner.os }}--${{ runner.arch }}--${{
hashFiles('tests/conda_test_environment.yml') }}-${{ env.CACHE_NUMBER }}
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
id: cache
- name: Update environment
run:
mamba env update -n climaf_test -f tests/conda_test_environment.yml
if: steps.cache.outputs.cache-hit != 'true'
- run: (cd doc && make -k html)
- name: Archive doc
uses: actions/upload-artifact@v3
with:
name: doc
retention-days: 5
path: |
doc/_build/html