Skip to content

Prepare for public release (#14) #11

Prepare for public release (#14)

Prepare for public release (#14) #11

Workflow file for this run

# https://www.sphinx-doc.org/en/master/tutorial/deploying.html
# https://github.com/peaceiris/actions-gh-pages
# https://github.com/actions/deploy-pages
name: 'Sphinx: Render docs'
on:
push:
branches:
- 'main'
paths:
- 'docs/**'
- 'h2ss/**'
- 'tests/**'
jobs:
build:
runs-on: ubuntu-latest
# permissions:
# contents: write
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: docs/requirements.txt
- name: Install setup dependencies
run: python -m pip install --upgrade pip setuptools wheel
- name: Install docs dependencies
run: python -m pip install -r docs/requirements.txt
- name: Make HTML
run: cd docs && make html
# - name: Build HTML
# uses: ammaraskar/sphinx-action@master
# with:
# pre-build-command: 'python -m pip install --upgrade pip setuptools wheel'
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: github-pages
path: docs/_build/html/
# - name: Deploy
# uses: peaceiris/actions-gh-pages@v4
# if: github.ref == 'refs/heads/main'
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: docs/_build/html
deploy:
needs: build # add a dependency to the build job
permissions: # grant GITHUB_TOKEN the permissions required to make a Pages deployment
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment: # deploy to the github-pages environment
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest # specify runner + deployment step
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action