forked from flatironinstitute/figpack
-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (100 loc) · 2.94 KB
/
deploy-to-pages.yml
File metadata and controls
117 lines (100 loc) · 2.94 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Build docs and extensions and deploy to GitHub Pages
on:
push:
branches: [main]
paths:
- "docs/**"
- "extension_packages/**"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
cache-dependency-path: figpack-figure/package-lock.json
- name: Install GUI dependencies and build
run: |
cd figpack-figure
npm ci
npm run build
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[docs,test]
- name: Install build dependencies
run: |
pip install build
- name: Install extension packages
run: |
cd extension_packages/figpack_force_graph
pip install -e .
cd ../figpack_3d
npm install
npm run build
pip install -e .
cd ../figpack_spike_sorting
npm install
npm run build
pip install -e .
cd ../figpack_experimental
npm install
npm run build
pip install -e .
cd ../figpack_nwb
npm install
npm run build
pip install -e .
cd ../figpack_franklab
npm install
npm run build
pip install -e .
- name: Build documentation
run: |
cd docs
python generate_doc_pages.py
sphinx-build -b html . _build/html
python devel/generate_example_rotator.py
python devel/generate_basic_views_tutorial_examples.py
python devel/generate_spike_sorting_tutorial_examples.py
python devel/generate_misc_tutorial_examples.py
python devel/generate_nwb_tutorial_examples.py
cp example_rotator.* _build/html/
- name: Build extension wheels
run: ./scripts/build-extension-wheels.sh docs/_build/html/wheels
- name: Generate wheel index
run: python scripts/generate-wheel-index.py docs/_build/html/wheels
- name: Setup Pages
if: github.ref == 'refs/heads/main'
uses: actions/configure-pages@v3
- name: Upload artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: docs/_build/html
deploy:
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4