build: fix GitHub gradle actions #113
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sphinx Pages | ||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
types: | ||
- closed | ||
permissions: write-all | ||
jobs: | ||
docs: | ||
if_merged: | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-python@v4 | ||
- name: Install XSLT Processor | ||
run: sudo apt-get install xsltproc sphinx-common | ||
- name: Install dependencies | ||
run: pip install furo myst_parser sphinx-prompt sphinx_substitution_extensions sphinx_issues sphinx_inline_tabs pygments | ||
- name: Checkout project sources | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: master | ||
fetch-depth: 0 | ||
- name: Setup Gradle | ||
uses: gradle/[email protected] | ||
- name: Run build with Gradle Wrapper | ||
run: FLOATING_TOC=false gradle --no-build-cache clean xmldoc sphinx | ||
- name: Deploy | ||
uses: actions/configure-pages@v2 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
# Upload entire repository | ||
path: 'build/sphinx' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |