CI: run on pull requests as well, not just pushes.
[nmigen.git] / .github / workflows / main.yaml
1 on:
2 push: {}
3 pull_request:
4 types: [opened, reopened, synchronize]
5 name: CI
6 jobs:
7 document:
8 runs-on: ubuntu-latest
9 steps:
10 - name: Check out source code
11 uses: actions/checkout@v2
12 with:
13 fetch-depth: 0
14 - name: Set up Python
15 uses: actions/setup-python@v2
16 - name: Install dependencies
17 run: |
18 python -m pip install --upgrade setuptools setuptools_scm wheel
19 pip install -r docs/requirements.txt
20 pip install -e .
21 - name: Build documentation
22 run: |
23 sphinx-build docs docs/_build
24 - name: Publish documentation
25 if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'
26 uses: JamesIves/github-pages-deploy-action@releases/v3
27 with:
28 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 BRANCH: gh-pages
30 FOLDER: docs/_build
31 TARGET_FOLDER: latest/