-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (59 loc) · 1.79 KB
/
Copy pathsphinx.yml
File metadata and controls
62 lines (59 loc) · 1.79 KB
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
name: "doc"
on:
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions: write-all
jobs:
sphinx:
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.8']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
- name: Install Python packages
run: |
pip install -r ./requirements/doc.txt
- name: Build ulist
run: |
maturin build --out dist -m ulist/Cargo.toml
- name: Install ulist
run: |
pip install ulist --no-index --find-links dist --force-reinstall
- name: Make docs
run: |
cd docs
make html
cd ..
- uses: actions/upload-artifact@v1
with:
name: DocumentationHTML
path: docs/html/
- name: Commit documentation changes
run: |
git clone https://github.com/Rust-Data-Science/ulist.git --branch gh-pages --single-branch gh-pages
cp -r docs/html/* gh-pages/
cd gh-pages
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present, so we ignore
# the return code.
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}