Skip to content

made sure that documents are built #42

made sure that documents are built

made sure that documents are built #42

name: "Pull Request Docs Check"
on:
- pull_request
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
# - uses: actions/setup-python@v4
# with:
# python-version: "3.10"
# - name: Install dependencies
# run: |
# python3 -m pip install -r requirements.txt
# - name: Sphinx build
# run: |
# python3 -m sphinx docs docs/build
# Standard drop-in approach that should work for most people.
- name: Build HTML
uses: ammaraskar/sphinx-action@master
with:
pre-build-command: "sudo apt-get install && pip install -r requirements.txt && pip install 'sphinx==7.1.2' --force-reinstall"
docs-folder: "docs/"
# Great extra actions to compose with:
# Create an artifact of the html output.
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: html-docs
path: docs/build/html/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
# if: github.ref == 'refs/heads/main'
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html
# - name: Commit documentation changes
# run: |
# git clone https://github.com/watakandai/specless.git --branch gh-pages --single-branch gh-pages
# cp -r docs/build/html/* gh-pages/
# cd gh-pages
# git config --local user.email "[email protected]"
# git config --local user.name "Kandai Watanabe"
# git add .
# git commit -m "Update documentation" -a || true
# # The above command will fail if no changes were present, so we ignore
# # the return code.
# - name: Push changes
# uses: ad-m/github-push-action@master
# with:
# branch: gh-pages
# directory: gh-pages
# github_token: ${{ secrets.GITHUB_TOKEN }}