-
Notifications
You must be signed in to change notification settings - Fork 4
37 lines (34 loc) · 942 Bytes
/
docs.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
name: Build docs
on:
pull_request:
push:
branches:
- master
workflow_dispatch:
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install deps
run: |
python -m pip install --upgrade pip
pip install -e .[docs]
- name: Build docs
run: |
make -C docs
- name: Tar docs
if: ${{ github.event_name != 'pull_request' }}
run: |
cd docs/build/html && tar -zcf ../../../docs.tar.gz *
- name: Upload html
if: ${{ github.event_name != 'pull_request' }}
env:
USER: ${{ secrets.DOCS_USERNAME }}
PASS: ${{ secrets.DOCS_PASSWORD }}
run: |
curl --data-binary "@docs.tar.gz" -XPUT "https://$USER:[email protected]/api/upload?path=$GITHUB_REPOSITORY/${{ github.ref_name }}"