File tree Expand file tree Collapse file tree 2 files changed +49
-38
lines changed
Filter options
Expand file tree Collapse file tree 2 files changed +49
-38
lines changed
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ name: build
7
7
on :
8
8
push :
9
9
branches : [ master, future ]
10
- # pull_request:
11
- # branches: [ master ]
10
+ pull_request :
11
+
12
12
13
13
jobs :
14
14
# Run tests on different versions of python
66
66
needs : unittest
67
67
runs-on : ubuntu-latest
68
68
steps :
69
- - uses : actions/checkout@v2
70
- - name : Set up Python 3.7
71
- uses : actions/setup-python@v1
72
- with :
73
- python-version : 3.7
74
- - name : Install dependencies
75
- run : |
76
- python -m pip install --upgrade pip
77
- pip install .[dev,docs]
78
- pip install git+https://github.com/petercorke/sphinx-autorun.git
79
- pip install sympy
80
- sudo apt-get install graphviz
81
- - name : Build docs
82
- run : |
83
- cd docs
84
- make html
85
- # Tell GitHub not to use jekyll to compile the docs
86
- touch build/html/.nojekyll
87
- cd ../
88
- - name : Commit documentation changes
89
- run : |
90
- git clone https://github.com/petercorke/spatialmath-python.git --branch gh-pages --single-branch gh-pages
91
- cp -r docs/build/html/* gh-pages/
92
- cd gh-pages
93
- git config --local user.email "action@github.com"
94
- git config --local user.name "GitHub Action"
95
- git add .
96
- git commit -m "Update documentation" -a || true
97
- # The above command will fail if no changes were present, so we ignore
98
- # that.
99
- - name : Push changes
100
- uses : ad-m/github-push-action@master
101
- with :
102
- branch : gh-pages
103
- directory : gh-pages
104
- github_token : ${{ secrets.GITHUB_TOKEN }}
69
+ uses : ./.github/workflows/sphinx.yml
70
+ if : ${{ github.event_name != 'pull_request' }}
Original file line number Diff line number Diff line change
1
+ name : Sphinx
2
+
3
+ on :
4
+ workflow_call :
5
+
6
+ jobs :
7
+ sphinx :
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - uses : actions/checkout@v2
11
+ - name : Set up Python 3.7
12
+ uses : actions/setup-python@v1
13
+ with :
14
+ python-version : 3.7
15
+ - name : Install dependencies
16
+ run : |
17
+ python -m pip install --upgrade pip
18
+ pip install .[dev,docs]
19
+ pip install git+https://github.com/petercorke/sphinx-autorun.git
20
+ pip install sympy
21
+ sudo apt-get install graphviz
22
+ - name : Build docs
23
+ run : |
24
+ cd docs
25
+ make html
26
+ # Tell GitHub not to use jekyll to compile the docs
27
+ touch build/html/.nojekyll
28
+ cd ../
29
+ - name : Commit documentation changes
30
+ run : |
31
+ git clone https://github.com/petercorke/spatialmath-python.git --branch gh-pages --single-branch gh-pages
32
+ cp -r docs/build/html/* gh-pages/
33
+ cd gh-pages
34
+ git config --local user.email "action@github.com"
35
+ git config --local user.name "GitHub Action"
36
+ git add .
37
+ git commit -m "Update documentation" -a || true
38
+ # The above command will fail if no changes were present, so we ignore
39
+ # that.
40
+ - name : Push changes
41
+ uses : ad-m/github-push-action@master
42
+ with :
43
+ branch : gh-pages
44
+ directory : gh-pages
45
+ github_token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments