-
Notifications
You must be signed in to change notification settings - Fork 21
70 lines (65 loc) · 1.69 KB
/
build_docs.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Build docs
on:
push:
branches:
- main
release:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
max-parallel: 5
steps:
- name: Set up GCC
run: |
sudo apt-get install -y gcc
shell: bash -l {0}
- name: install gsl
run: |
sudo apt-get install -y libgsl-dev
- name: check out X-PSI main
uses: actions/checkout@v3
with:
ref: main
- name: Install Python3 Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
cache-env: true
cache-env-key: env-envkey-${{ github.sha }}-${{ github.run_attempt }}
environment-file: basic_environment.yml
environment-name: xpsipy3
extra-specs: |
python=3.10
- name : install docs dependencies
run: |
micromamba install sphinx decorator h5py
micromamba install -c conda-forge nbsphinx nbconvert
pip install sphinxcontrib-websupport sphinx_rtd_theme
pip install torch
- name : install other needed packages
run: |
micromamba install -c conda-forge getdist nestcheck
- name: install X-PSI package
run: |
python setup.py install
shell: bash -l {0}
env:
CC: gcc-10
- name : build docs
run: |
make html
working-directory: docs/
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v3
with:
target_branch: gh-pages
build_dir: docs/build/html
jekyll: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}