From 58c68dcd32070fe2217eb699cce8f31c8ab99ba1 Mon Sep 17 00:00:00 2001 From: Eleonore Vonck Date: Thu, 7 Aug 2025 09:22:33 -0700 Subject: [PATCH 1/6] Update documentation after making repo public --- .github/workflows/docs.yml | 51 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3ae388d..f4a6e47 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -73,3 +73,54 @@ jobs: 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 \ No newline at end of file From 3b6ad520ba3bfca0d15314b5ad47a3d6fc715c68 Mon Sep 17 00:00:00 2001 From: Eleonore Vonck Date: Thu, 7 Aug 2025 09:27:21 -0700 Subject: [PATCH 2/6] Force documentation github action --- .github/workflows/docs.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f4a6e47..815f418 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,10 +5,6 @@ on: branches: - main pull_request: - branches: [ main ] - paths: - - 'src/**/*.py' - - 'docs/**' workflow_dispatch: permissions: From 5b8061f5f7c4aab8c60988d9a78d87eb2237e373 Mon Sep 17 00:00:00 2001 From: Eleonore Vonck Date: Thu, 7 Aug 2025 09:32:20 -0700 Subject: [PATCH 3/6] Fix ation error --- .github/workflows/docs.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 815f418..c85dc97 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,6 +5,7 @@ on: branches: - main pull_request: + branches: [ main ] workflow_dispatch: permissions: @@ -68,8 +69,7 @@ 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: + build: runs-on: ubuntu-latest if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' needs: [check-docs] @@ -119,4 +119,4 @@ build: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 \ No newline at end of file + uses: actions/deploy-pages@v4 From cd812f1648da212d584d9034a131d930b4200e1e Mon Sep 17 00:00:00 2001 From: Eleonore Vonck Date: Thu, 7 Aug 2025 09:41:19 -0700 Subject: [PATCH 4/6] Limit documentation upload when changes are made to the code --- .github/workflows/docs.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c85dc97..2b7bd44 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -6,6 +6,9 @@ on: - main pull_request: branches: [ main ] + paths: + - 'src/**/*.py' + - 'docs/**' workflow_dispatch: permissions: From d7fdb643013b751a7c9d8ac99cd85d48502213e3 Mon Sep 17 00:00:00 2001 From: Eleonore Vonck Date: Thu, 7 Aug 2025 09:49:57 -0700 Subject: [PATCH 5/6] Allow github action to work on workflow_dispatch --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2b7bd44..b717b4a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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: @@ -113,7 +113,7 @@ jobs: 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' + if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' needs: build environment: name: github-pages From 28fe60a668df2e95506296b6281a4070ea1e0504 Mon Sep 17 00:00:00 2001 From: Eleonore Vonck Date: Thu, 7 Aug 2025 09:58:12 -0700 Subject: [PATCH 6/6] Update Readme link to documentation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f076299..663400f 100644 --- a/README.md +++ b/README.md @@ -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: