-
Notifications
You must be signed in to change notification settings - Fork 9
63 lines (58 loc) · 2.33 KB
/
pub_docs.yml
File metadata and controls
63 lines (58 loc) · 2.33 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
63
name: Publish Docs
on:
push:
branches: [main] # only if commit message starts with "docs "
workflow_dispatch:
jobs:
publish-docs:
name: Build sphinx documentation on docs branch
runs-on: ubuntu-latest
if: |
${{ github.event_name=='workflow_dispatch'
|| (github.event_name=='push'
&& (startsWith(github.ref, 'refs/tags')
|| startsWith(github.event.head_commit.message, 'docs ')))}}
steps:
# - name: Set up FFmpeg
# uses: FedericoCarboni/setup-ffmpeg@v3
# with:
# # A specific version to download, may also be "release" or a specific version
# # like "6.1.0". At the moment semver specifiers (i.e. >=6.1.0) are supported
# # only on Windows, on other platforms they are allowed but version is matched
# # exactly regardless.
# ffmpeg-version: release
# # Target architecture of the ffmpeg executable to install. Defaults to the
# # system architecture. Only x64 and arm64 are supported (arm64 only on Linux).
# architecture: 'x64'
# # As of version 3 of this action, builds are no longer downloaded from GitHub
# # except on Windows: https://github.com/GyanD/codexffmpeg/releases.
# github-token: ${{ github.server_url == 'https://github.com' && github.token || '' }}
- name: Setup FFmpeg
uses: AnimMouse/setup-ffmpeg@v1
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- name: Setup Python dependencies
run: |
python -m pip install -U pip
pip install -r docsrc/requirements.txt
pip install -e .
- name: Build and Commit
run: |
make html
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -f docs
git commit -m "github action"
# uses: sphinx-notes/pages@master
# with:
# documentation_path: docsrc
- name: Push changes to docs branch
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: docs
force: true