forked from pola-rs/polars-book
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 1.24 KB
/
docs.yaml
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
name: Polars Guides
on:
push:
branches:
- master
jobs:
test:
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y graphviz make wget
python -m pip install ghp-import
sudo wget https://github.com/rust-lang/mdBook/releases/download/v0.4.7/mdbook-v0.4.7-x86_64-unknown-linux-gnu.tar.gz -O - | sudo tar -xzf - -C /usr/bin/
sudo wget https://github.com/ritchie46/mdBook/releases/download/api-0.0.1/mdbook -O /usr/bin/mdbook2
sudo chmod +x /usr/bin/mdbook2
- name: Run snippets
run: |
make run
- name: Deploy docs
run: |
mkdir -p docs
cd user_guide
mdbook build --dest-dir ../docs/user-guide .
cd ..
echo '<meta http-equiv=refresh content=0;url=/polars-book/user-guide/index.html>' > docs/index.html
ghp-import --no-jekyll docs
git push -qf https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git gh-pages