forked from pola-rs/polars
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.42 KB
/
docs-deploy-python.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
name: Deploy Python documentation
on:
push:
branches:
- main
paths:
- py-polars/docs/**
- py-polars/polars/**
- .github/workflows/docs-deploy-python.yml
tags:
- py-**
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
deploy-docs:
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: Deploy Python docs for latest development version
if: ${{ github.ref_name == 'main' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: py-polars/docs/build/html
target-folder: py-polars/dev
- name: Deploy Python docs for latest release version
if: ${{ github.ref_name != 'main' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: py-polars/docs/build/html
# Keeping the html subfolder here for backwards compatibility
target-folder: py-polars/html