Skip to content

Commit

Permalink
trying another docs deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-chew committed Mar 18, 2024
1 parent 41b6a9b commit 73af456
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
41 changes: 19 additions & 22 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
name: documentation
name: "Sphinx: Render docs"

on: [push, pull_request, workflow_dispatch]

permissions:
contents: write
on: push

jobs:
docs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Install dependencies
run: |
pip install sphinx furo sphinx-changelog
- name: Sphinx build
run: |
sphinx-build docs/source _build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true
- 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
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ numpy==1.24.3
pandas==2.0.3
scikit_learn==1.3.0
scipy==1.12.0

# Sphinx requirements
furo
sphinx-changelog

0 comments on commit 73af456

Please sign in to comment.