Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
upload-cloud

GitHub Action

Sphinx to GitHub Pages

3.0beta Pre-release

Sphinx to GitHub Pages

upload-cloud

Sphinx to GitHub Pages

GitHub Action to deploy Sphinx documentation to GitHub Pages

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Sphinx to GitHub Pages

uses: sphinx-notes/pages@3.0beta

Learn more about this action in sphinx-notes/pages

Choose a version

Sphinx to GitHub Pages V3

https://img.shields.io/github/stars/sphinx-notes/pages.svg?style=social&label=Star&maxAge=2592000

Help you deploying your Sphinx documentation to Github Pages.

Warning

v3 is in beta and subject to change, use v2 if you need a stable version.

Usage

  1. Set the publishing sources to "Github Actions"

  2. Create workflow:

    name: Deploy Sphinx documentation to Pages
    
    # Runs on pushes targeting the default branch
    on:
      push:
        branches: [master]
    
    jobs:
      pages:
        runs-on: ubuntu-20.04
        environment:
          name: github-pages
          url: ${{ steps.deployment.outputs.page_url }}
        permissions:
          pages: write
          id-token: write
        steps:
        - id: deployment
          uses: sphinx-notes/pages@v3

Inputs

Input Default Required Description
documentation_path ./docs false Path to Sphinx source files
requirements_path ./docs/requirements.txt false Path to to requirements file
python_version 3.10 false Version of Python
sphinx_version 5.3 false Version of Sphinx
cache false false Enable cache to speed up documentation building

Outputs

Output Description
page_url URL to deployed GitHub Pages

Examples

The following repository's pages are built by this action:

You can found the workflow file in their repository.

Tips

Copy extra files to site

Use Sphinx confval html_extra_path.