-
-
Notifications
You must be signed in to change notification settings - Fork 21
65 lines (65 loc) · 2.32 KB
/
ci.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
name: Build Example Project [using jupyter-book]
on: [push]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch lecture-python-programming.myst
shell: bash -l {0}
run: |
git clone --branch quantecon-book-theme https://github.com/QuantEcon/lecture-python-programming.myst
- name: Setup Anaconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
auto-activate-base: true
miniconda-version: 'latest'
python-version: "3.10"
environment-file: lecture-python-programming.myst/environment.yml
activate-environment: lecture-python-programming
- name: Install quantecon-book-theme
shell: bash -l {0}
run: |
pip uninstall -y quantecon-book-theme
python -m pip install .
- name: Install sphinx-multitoc-numbering
shell: bash -l {0}
run: |
git clone https://github.com/executablebooks/sphinx-multitoc-numbering.git
cd sphinx-multitoc-numbering
python setup.py install
cd ../ && rm -rf sphinx-multitoc-numbering
- name: Install sphinx-exercise
shell: bash -l {0}
run: |
git clone https://github.com/executablebooks/sphinx-exercise.git
cd sphinx-exercise
python setup.py install
cd ../ && rm -rf sphinx-exercise
- name: Install Dependencies
shell: bash -l {0}
run: |
pip install jupyter-book
- name: Display Conda Environment Versions
shell: bash -l {0}
run: conda list
- name: Display Pip Versions
shell: bash -l {0}
run: pip list
- name: Build HTML
shell: bash -l {0}
run: |
cd lecture-python-programming.myst
jb build lectures --path-output ./
- name: Preview Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: 'lecture-python-programming.myst/_build/html/'
production-branch: master
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Preview Deploy from GitHub Actions"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}