Skip to content

Bump actions/checkout from 5 to 6 #36

Bump actions/checkout from 5 to 6

Bump actions/checkout from 5 to 6 #36

Workflow file for this run

name: Publish Sphinx Docs to GitHub Pages
on:
# Build the docs on pushes to main branch, PRs to main branch, and new tags.
# Publish only on demand.
push:
branches:
- main
tags:
- '*' # all tags
pull_request:
branches:
- main
workflow_dispatch: # allow manual triggering
inputs:
deploy:
description: 'Deploy documentation'
type: boolean
required: true
default: false
defaults:
run:
shell: bash -l {0}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Info
run: |
echo $(pwd)
ls -lAFgh
- name: Install package
run: |
pip install -e .[doc] -vv
- name: Diagnostics
run: |
python -m pip list
python -c "import spec2nexus; print(f'{spec2nexus.__version__=}')"
- name: Sphinx
run: |
TZ=UTC make -C docs html
- name: Deploy (to gh-pages branch) only on demand
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.event.inputs.deploy }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html
force_orphan: true