-
Notifications
You must be signed in to change notification settings - Fork 78
58 lines (47 loc) · 1.44 KB
/
documentation.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
56
57
58
name: Documentation
on:
push:
branches:
- master
paths:
# For the current generated documentation, these trigger paths are sufficient.
# Long-term, job-level triggers are more appropriate.
# https://how.wtf/run-workflow-step-or-job-based-on-file-changes-github-actions.html
- src/fundus/publishers/**
- scripts/generate_tables.py
pull_request:
paths:
- src/fundus/publishers/**
- scripts/generate_tables.py
workflow_dispatch:
env:
PYTHONPATH: .
CI_COMMIT_MESSAGE: >-
${{
github.event_name == 'pull_request'
&& format('Update documentation from @ {0} (#{1})', github.event.pull_request.head.sha, github.event.number)
|| format('Update documentation from @ {0}', github.sha)
}}
jobs:
supported_publishers:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Set up Git repository
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Fundus
run: pip install -e .[dev]
- name: Generate 'supported_publishers.md'
run: python scripts/generate_tables.py
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: ${{ env.CI_COMMIT_MESSAGE }}
file_pattern: docs