-
Notifications
You must be signed in to change notification settings - Fork 7
47 lines (39 loc) · 1.28 KB
/
docs_ci.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
name: Build and Deploy Documentation
on:
push:
branches:
- dev
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
env:
CI_COMMIT_AUTHOR: ${{ github.event.head_commit.author.name }}
CI_COMMIT_EMAIL: ${{ github.event.head_commit.author.email }}
jobs:
docs-build-and-deploy:
runs-on: ubuntu-latest
timeout-minutes: 60
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Cache Python Environment
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml') }}
- name: Set Up Dependencies
run: |
source .github/setup.sh ${{ runner.os }} $env
python -m pip install -r docs/requirements.txt
- name: Build and Deploy Documentation
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "${{ env.CI_COMMIT_EMAIL }}"
cd docs && ./make.sh && REPO_URL=https://${{ github.actor }}:${{ github.token }}@github.com/${{ github.repository }}.git ./upload.sh