Skip to content

Commit

Permalink
Merge b52fae1 into 864d844
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian authored Aug 29, 2023
2 parents 864d844 + b52fae1 commit af890f5
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 7 deletions.
44 changes: 37 additions & 7 deletions .github/workflows/publish-docs.yml → .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,54 @@ jobs:
run: |
echo "The docs will be published from this workflow run."
- name: Set timezone
uses: szenius/set-timezone@v1.2
with:
timezoneLinux: "America/Chicago"

- name: Make Temporary Directory for Sphinx content
run: |
echo "SRC_DIR=$(pwd)" >> ${GITHUB_ENV}
echo "TMP_DIR=$(mktemp -d)" >> ${GITHUB_ENV}
- name: Build and Commit
uses: sphinx-notes/pages@v3
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo

- uses: actions/setup-python@v4
with:
# path to conf.py directory
documentation_path: ./docs/source
requirements_path: ./docs/requirements.txt
publish: false
python-version: "3.11"

- name: Install Sphinx build requirements
run: pip install -r ./docs/requirements.txt

- name: Install our package
run: |
pip install --no-deps -e . -vv
- name: Show Environment variables
run: |
echo "SRC_DIR=${SRC_DIR}"
echo "TMP_DIR=${TMP_DIR}"
- name: Sphinx
run: |
sphinx-build -M html ./docs/source "${TMP_DIR}/build"
- name: Define ... HTML_DIR
run: |
echo "HTML_DIR=${TMP_DIR}/build/html" >> ${GITHUB_ENV}
- name: Diagnostics
run: |
ls -lAFghR "${HTML_DIR}"
- name: Publish (push gh-pages branch) only on demand
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event.inputs.deploy }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.TMP_DIR }}
publish_dir: ${{ env.HTML_DIR }}
force_orphan: true
3 changes: 3 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
numpy
pydata-sphinx-theme
setuptools-scm
sphinx
sphinx-rtd-theme

0 comments on commit af890f5

Please sign in to comment.