-
Notifications
You must be signed in to change notification settings - Fork 139
66 lines (54 loc) · 1.7 KB
/
build.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
name: build
# permissions:
# contents: write
# pages: write
on:
push:
branches:
- build-book-action
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: install mamba
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment.yml
init-shell: >-
bash
cache-environment: true
post-cleanup: 'all'
- name: set timezone
run: |
TZ="Europe/London" &&
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime &&
echo $TZ > /etc/timezone
- name: install linux deps
run: |
sudo apt-get -y install openssl graphviz nano texlive graphviz-dev unzip
- name: install special fonts
run: |
mkdir -p /usr/share/fonts/truetype/ &&
wget https://www.wfonts.com/download/data/2015/10/08/varta/varta.zip &&
unzip varta.zip &&
install -m644 *.ttf /usr/share/fonts/truetype/ &&
rm *.ttf
rm varta.zip
- name: install text models
run: |
micromamba run -n codeforecon python3 -m spacy download en_core_web_sm &&
micromamba run -n codeforecon python3 -m nltk.downloader all
- name: special fix for todoify
run: |
sed -i '90 s/^/#/' /home/runner/micromamba/envs/codeforecon/lib/python3.10/site-packages/mdit_py_plugins/tasklists/__init__.py
- name: build the book
run: |
micromamba run -n codeforecon jupyter-book build . --verbose
- name: success
run: |
echo "success!"