diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 000000000..15abc569c --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,39 @@ +on: + push: + branches: + - master + pull_request: + branches: + - "**" +jobs: + run: + runs-on: ubuntu-18.04 + steps: + # - uses: docker://pandoc/latex:2.9 + - uses: actions/checkout@master + - uses: actions/setup-python@v2 + with: + python-version: '3.8' # Version range or exact version of a Python version to use, using semvers version range syntax. + architecture: 'x64' # (x64 or x86) + - run: | + # add dependencies based on the conf.py + pip install -r requirements.txt + - name: Build docs + run: | + # Turn warnings into errors; ensure .doctrees doesn't get deployed + sphinx-build -b html -WT --keep-going spec build/latest -d doctrees + touch build/.nojekyll + - uses: actions/upload-artifact@v2 + if: ${{ github.event_name == 'pull_request'}} + with: + name: html + path: build/ + if-no-files-found: error + - name: Deploy + if: ${{ github.ref == 'refs/heads/master'}} + uses: JamesIves/github-pages-deploy-action@master + env: + ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BASE_BRANCH: master # The branch the action should deploy from. + BRANCH: gh-pages # The branch the action should deploy to. + FOLDER: build