-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb2e135
commit aa50461
Showing
1 changed file
with
30 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,27 +2,37 @@ name: Create Documentation | |
on: | ||
push: | ||
branches: | ||
- develop | ||
- develop | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.12 | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install . | ||
pip install myst-parser sphinx-rtd-theme # Install myst_parser and sphinx_rtd_theme | ||
- name: Build Documentation | ||
run: | | ||
sphinx-build -b html docs/ build/ -W -v | ||
- name: Push changes | ||
uses: ad-m/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: gh-pages | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.12 | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Install the required dependencies | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install myst-parser sphinx-rtd-theme | ||
pip install -r requirements.txt | ||
# Install your package to ensure autodoc works | ||
- name: Install ms_mint package | ||
run: pip install -e . | ||
|
||
# Build the Sphinx documentation | ||
- name: Build Documentation | ||
run: | | ||
sphinx-build -b html docs/ docs/_build/html -W -v | ||
# Deploy the built documentation to the gh-pages branch | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs/_build/html # Ensure this path matches your build output |