-
Notifications
You must be signed in to change notification settings - Fork 2
126 lines (107 loc) · 3.47 KB
/
documentation.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
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
118
119
120
121
122
123
124
125
126
name: documentation
on:
push:
branches: [ main, data-fetch-docs-build ]
paths:
- sed/**/*
- docs/**
- tutorial/**
- .github/workflows/documentation.yml
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
# - name: Maximize build space
# uses: easimon/maximize-build-space@master
# with:
# root-reserve-mb: 2048
# swap-size-mb: 1024
# remove-dotnet: 'true'
# remove-codeql: 'true'
# remove-android: 'true'
# remove-docker-images: 'true'
- name: Check out the repository
uses: actions/checkout@v4
with:
lfs: true
- name: Setup Python, Poetry and Dependencies
uses: packetcoders/action-setup-cache-python-poetry@main
with:
python-version: 3.8
poetry-version: 1.2.2
- name: Install notebook dependencies
run: poetry install -E notebook --with docs
- name: Install pandoc
run: |
sudo wget https://github.com/jgm/pandoc/releases/download/3.1.8/pandoc-3.1.8-1-amd64.deb
sudo dpkg -i pandoc-3.1.8-1-amd64.deb > /dev/null 2>&1
- name: Remove SXP notebook
run: |
cp -r $GITHUB_WORKSPACE/sed/config $GITHUB_WORKSPACE/docs/sed
rm $GITHUB_WORKSPACE/tutorial/5_sxp_workflow.ipynb
- name: Cache build
uses: actions/cache/restore@v3
id: restore-cache
with:
path: |
_build/
docs/tutorial/*ipynb
docs/tutorial/tutorial_checksums.txt
key: ${{ runner.os }}-docs-build-${{ hashFiles('docs/tutorial/tutorial_checksums.txt') }}
restore-keys: |
${{ runner.os }}-docs-build-
- name: Compute notebook checksums
id: compute-checksums
run: |
find tutorial -name "*.ipynb" | sort | xargs sha256sum > tutorial_checksums.txt
- name: Move cached executed notebooks
run: python docs/move_changed_notebooks.py
- name: Download datasets
run: poetry run python docs/download_datasets.py
# - name: Build Flash parquet files
# run: |
# cd $GITHUB_WORKSPACE/docs
# poetry run python build_flash_parquets.py
- name: Build Sphinx docs
run: poetry run sphinx-build -b html $GITHUB_WORKSPACE/docs $GITHUB_WORKSPACE/_build
- name: Cache build
uses: actions/cache/save@v3
id: save-cache
with:
path: |
_build/
docs/tutorial/*ipynb
docs/tutorial/tutorial_checksums.txt
key: ${{ runner.os }}-docs-build-${{ hashFiles('docs/tutorial/tutorial_checksums.txt') }}
# upload the cache as artifact
- name: Upload cache
uses: actions/upload-artifact@v4
with:
path: |
_build/
docs/tutorial/*ipynb
docs/tutorial/tutorial_checksums.txt
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '_build'
# deploy:
# 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