-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (42 loc) · 1.2 KB
/
docs.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
---
name: "Deploy docs on GitHub Pages"
on:
push:
branches:
- "main"
workflow_dispatch:
inputs:
logLevel:
description: "Log level"
required: true
default: "warning"
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.10.x'
- name: Install sphinx and rtd-theme
run: |
pip install -U Sphinx sphinx-rtd-theme
- name: Build docs
run: |
cd docs
TZ=UTC make html
- name: Commit documentation changes
run: |
git clone https://github.com/CarloDePieri/pytest-vcr-delete-on-fail.git --branch gh-pages --single-branch gh-pages
cp -r docs/build/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
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}