Remove action-sphinx-docs-to-gh-pages #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |