File tree 3 files changed +47
-7
lines changed
3 files changed +47
-7
lines changed Original file line number Diff line number Diff line change
1
+ # Github Actions workflow to generate documentation
2
+ # Uses the following shared task definitions:
3
+ # - (checkout, upload artifact) from Github
4
+ # - sphinx-action maintained by @ammaraskar
5
+ name : Sphinx build
6
+
7
+ # Controls when the action will run.
8
+ # Triggers the workflow on push or pull request events.
9
+ on :
10
+ - push
11
+ - pull_request
12
+
13
+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
14
+ jobs :
15
+ # This workflow contains a single job called "build"
16
+ build :
17
+ # The type of runner that the job will run on
18
+ runs-on : ubuntu-latest
19
+
20
+ # Steps are a sequence of tasks that will be executed as part of the job
21
+ steps :
22
+ # Check out repository under $GITHUB_WORKSPACE
23
+ - uses : actions/checkout@v2
24
+ # Builds docs using sphinx
25
+ - uses : ammaraskar/sphinx-action@master
26
+ with :
27
+ docs-folder : " doc/"
28
+ # Create an artifact out of the generated HTML
29
+ - uses : actions/upload-artifact@v1
30
+ with :
31
+ name : UserGuideHTML
32
+ path : " doc/_build/html/"
Original file line number Diff line number Diff line change
1
+ sphinx_rtd_theme
2
+ sphinx_copybutton
3
+
Original file line number Diff line number Diff line change 28
28
import os
29
29
from time import strftime
30
30
31
- from PyQt5 .QtCore import QDir
32
-
33
31
VERSION = "2.5.1-dev2"
34
32
MINIMUM_LIBOPENSHOT_VERSION = "0.2.5"
35
33
DATE = "20200228000000"
98
96
print ("Loading translations from: {}" .format (language_path ))
99
97
100
98
# Compile language list from :/locale resource
101
- langdir = QDir (language_path )
102
- langs = langdir .entryList (['OpenShot.*.qm' ], QDir .NoDotAndDotDot | QDir .Files ,
103
- sort = QDir .Name )
104
- for trpath in langs :
105
- SUPPORTED_LANGUAGES .append (trpath .split ('.' )[1 ])
99
+ try :
100
+ from PyQt5 .QtCore import QDir
101
+ langdir = QDir (language_path )
102
+ langs = langdir .entryList (
103
+ ['OpenShot.*.qm' ],
104
+ QDir .NoDotAndDotDot | QDir .Files ,
105
+ sort = QDir .Name )
106
+ for trpath in langs :
107
+ SUPPORTED_LANGUAGES .append (trpath .split ('.' )[1 ])
108
+ except ImportError :
109
+ # Fail gracefully if we're running without PyQt5 (e.g. CI tasks)
110
+ pass
106
111
107
112
SETUP = {
108
113
"name" : NAME ,
You can’t perform that action at this time.
0 commit comments