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

Fix Sphinx GitHub Action #614

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/workflows/sphinx.yml
Expand Up @@ -5,30 +5,33 @@ on:
branches:
- main

permissions:
contents: write

jobs:
build:
name: Sphinx Pages
runs-on: ubuntu-latest
steps:
- name: "Checkout Main Branch"
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
persist-credentials: false
path: main
ref: main

- name: "Checkout GitHub Pages Branch"
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
persist-credentials: false
path: gh-pages
ref: gh-pages

- name: "Setup Python & Install Spinx"
uses: actions/setup-python@v3
- name: "Setup Python"
uses: actions/setup-python@v4

- name: "Install Sphinx & Theme"
run: pip install sphinx==4.5.0 sphinx-rtd-theme==1.0.0
run: pip install sphinx==7.2.6 sphinx-rtd-theme==2.0.0

- name: "Run Sphinx"
run: sphinx-build -b html main/docs gh-pages -E -d $GITHUB_WORKSPACE/.doctree
Expand All @@ -39,6 +42,6 @@ jobs:
git add -A
git config --global user.email "$(git show --format=%ae -s)"
git config --global user.name "$(git show --format=%an -s)"
git commit -m "From $GITHUB_REF $(echo ${GITHUB_SHA} | cut -c 1-8)"
git diff-index --quiet HEAD || git commit -m "From $GITHUB_REF $(echo ${GITHUB_SHA} | cut -c 1-8)"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git push