Skip to content
Closed
Show file tree
Hide file tree
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
52 changes: 51 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ concurrency:
jobs:
check-docs:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
# Make this job informational only - don't block PR
continue-on-error: true
steps:
Expand Down Expand Up @@ -72,4 +72,54 @@ jobs:
repo: context.repo.repo,
body: '⚠️ **Documentation is out of sync with the code!**\n\nPlease run `python docs/generate_docs.py` and commit the updated documentation files.'
})
build:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'
needs: [check-docs]
# Make this job informational only for PRs - don't block PR
continue-on-error: ${{ github.event_name == 'pull_request' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
poetry install --with docs
- name: Generate RST files
run: |
cd ${{ github.workspace }}
poetry run python docs/generate_docs.py
- name: Build documentation
run: |
cd ${{ github.workspace }}/docs
poetry run sphinx-build -b html source build/html
- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{ github.workspace }}/docs/build/html

deploy:
# Only deploy on push to main or workflow_dispatch, skip on PRs
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch'
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ The storage is abstracted using `smart_open`, making it seamless to switch betwe

API documentation is automatically generated and deployed to GitHub Pages on each push to the main branch. You can access the documentation at:

[https://roblox.github.io/sentinel/](https://roblox.github.io/sentinel/)
[https://roblox.github.io/sentinel/](https://roblox.github.io/Sentinel/)

To build the documentation locally:

Expand Down