-
-
Notifications
You must be signed in to change notification settings - Fork 2k
57 lines (47 loc) · 1.55 KB
/
docs-deploy.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Deploy documentation
on:
push:
branches:
- master
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: 'py-polars/docs/requirements-docs.txt'
- name: Install Python dependencies
working-directory: py-polars/docs
run: |
pip install --upgrade pip
pip install -r requirements-docs.txt
- name: Build Python documentation
working-directory: py-polars/docs
run: make html
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-12-20
components: rust-docs
- name: Cache Rust
uses: Swatinem/rust-cache@v2
- name: Build Rust documentation
env:
RUSTFLAGS: --cfg docsrs
run: cargo doc --features=docs-selection --package polars
- name: Prepare deployment
run: |
echo '<meta http-equiv=refresh content=0;url=polars/index.html>' > target/doc/index.html
mkdir target/doc/py-polars
mv py-polars/docs/build/html target/doc/py-polars
- name: Deploy
run: |
ghp-import -n target/doc
git push -qf https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git gh-pages
# Make sure documentation artifacts are not cached
- name: Clean up documentation artifacts
run: rm -rf target/doc