forked from hpc4cmb/toast
-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (82 loc) · 2.53 KB
/
docs.yml
File metadata and controls
94 lines (82 loc) · 2.53 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Documentation
on:
workflow_dispatch:
release:
types: [ published ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_docs:
name: Build Documentation
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Configure pages
uses: actions/configure-pages@v6
- name: Checkout
uses: actions/checkout@v6
with:
fetch-tags: true
fetch-depth: 0
- name: Setup Conda Base
run: |
sudo rm -rf /usr/share/miniconda \
&& sudo rm -rf /usr/local/miniconda \
&& curl -SL -o miniforge.sh https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh \
&& bash miniforge.sh -b -f -p ~/conda \
&& source ~/conda/etc/profile.d/conda.sh \
&& conda activate base \
&& conda update -n base --yes conda
- name: Check Conda Config
run: |
source ~/conda/etc/profile.d/conda.sh \
&& conda activate base \
&& conda info \
&& conda list \
&& conda config --show-sources \
&& conda config --show
- name: Create Conda Env
run: |
source ~/conda/etc/profile.d/conda.sh \
&& conda activate base \
&& ./conda_setup.sh -e docs -p 3.13 \
- name: Install TOAST
run: |
source ~/conda/etc/profile.d/conda.sh \
&& conda activate docs \
&& pip install -v .
- name: Install Doc Dependencies
run: |
source ~/conda/etc/profile.d/conda.sh \
&& conda activate docs \
&& pip install -r docs/doc_requirements.txt
- name: Build Docs
run: |
source ~/conda/etc/profile.d/conda.sh \
&& conda activate docs \
&& pushd docs \
&& ./run_notebooks.sh ./docs \
&& ./build.sh \
&& popd
- name: Upload Docs
uses: actions/upload-pages-artifact@v5
with:
path: docs/site
deploy_docs:
name: Deploy Documentation
needs: build_docs
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
id-token: write
pages: write
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5