@@ -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' }}
0 commit comments