Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert #30 #31

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ on:
type: string
default: docs/_build/html
description: The docs path name
project-root:
required: false
type: string
default: '.'
description: The root directory of conrtaining the docs folder

jobs:
sphinx-deploy:
Expand All @@ -24,23 +19,21 @@ jobs:
python-version: 3.x

- name: Install dependencies
working-directory: ${{ inputs.project-root }}
run: pip install -r docs/requirements.txt -e .

- name: Build docs
working-directory: ${{ inputs.project-root }}
run: sphinx-build docs ${{ inputs.path-to-doc }}

- name: Upload docs build as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.project-root == '.' && github.event.repository.name || inputs.project-root }}_docs
path: ${{ github.workspace }}/${{ inputs.project-root }}/${{ inputs.path-to-doc }}
name: ${{ github.event.repository.name }}_docs
path: ${{ github.workspace }}/${{ inputs.path-to-doc }}

- name: Upload to github pages
# only publish doc changes from main branch
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./${{ inputs.project-root }}/${{ inputs.path-to-doc }}
publish_dir: ./${{ inputs.path-to-doc }}