forked from malb/lattice-estimator
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (50 loc) · 1.71 KB
/
jupyter.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
name: Publish Jupyter Notebooks
on:
push:
branches: [ main, docs ]
jobs:
deploy:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Checkout Code
uses: actions/checkout@v2
- name: Install Prerequists
run: |
python -m pip install --upgrade pip
pip install sphinxcontrib-jupyter
- name: Generate Jupyter Notebooks
run: |
make jupyter
- name: Copy over
run: |
mkdir out
cp pyproject.toml out/
cp -r .github/ out/
cp -r estimator/ out/
rm -rf out/estimator/__pycache__
echo 'name: lattice-estimator-environment' >> out/environment.yml
echo 'channels:' >> out/environment.yml
echo ' - conda-forge' >> out/environment.yml
echo 'dependencies:' >> out/environment.yml
echo ' - python' >> out/environment.yml
echo ' - pip' >> out/environment.yml
echo ' - sage' >> out/environment.yml
echo ' - pip:' >> out/environment.yml
echo ' - nbgitpuller' >> out/environment.yml
echo ' - sphinx-gallery' >> out/environment.yml
echo ' - pandas' >> out/environment.yml
echo ' - matplotlib' >> out/environment.yml
cp docs/_build/jupyter/algorithms/*.ipynb out
cp docs/_build/jupyter/prompt.ipynb out
- name: Publish
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: jupyter-notebooks
FOLDER: out
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}