@@ -7,8 +7,8 @@ name: build
77on :
88 push :
99 branches : [ master, future ]
10- # pull_request:
11- # branches: [ master ]
10+ pull_request :
11+
1212
1313jobs :
1414 # Run tests on different versions of python
6666 needs : unittest
6767 runs-on : ubuntu-latest
6868 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