Skip to content

Remove action-sphinx-docs-to-gh-pages #4

Remove action-sphinx-docs-to-gh-pages

Remove action-sphinx-docs-to-gh-pages #4

Workflow file for this run

name: Build docs
on:
push:
branches:
- "*"
jobs:
sphinx_docs_to_gh-pages:
name: Sphinx docs to gh-pages
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: "3.12"
cache: true
- name: Install dependencies
run: pdm sync
- name: Build docs
run: pdm docs
- name: Create .nojekyll in case 'sphinx.ext.githubpages' is not used
run: touch "docs/_build/.nojekyll"
- name: Push to gh-pages
run: |
git add -f "docs/_build/"
git commit -m "From $GITHUB_REF"
git push origin `git subtree split --prefix "docs/_build/" "$GITHUB_REF"`:gh-pages --force