Skip to content

Commit

Permalink
ci: add official sphinx--workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Khushiyant committed Jan 30, 2024
1 parent dd29891 commit 9fc940c
Showing 1 changed file with 19 additions and 23 deletions.
42 changes: 19 additions & 23 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
name: Deploy Sphinx documentation to Pages
name: "Sphinx: Render docs"

on:
push:
branches:
- main
on: push

jobs:
deploy:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx
- name: Build docs
run: |
cd docs && make html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/html
- uses: actions/checkout@v4
- name: Build HTML
uses: ammaraskar/sphinx-action@master
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: html-docs
path: docs/build/html/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html

0 comments on commit 9fc940c

Please sign in to comment.