Skip to content

Commit

Permalink
Workflow to deploy mk-docs on gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedNasser8 committed Jun 20, 2024
1 parent cf69511 commit 5b1c487
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,26 @@ jobs:
with:
python-version: '3.10'

- name: Install Poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: '1.8.3'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[tests,docs]
run: poetry install --extras "tests docs"

- name: Update Sphinx htmls
- name: Build MkDocs documentation
run: |
make html
working-directory: docs
poetry run mkdocs build
working-directory: docs-mk

- name: Publish to gh-pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages # default: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html/
publish_dir: docs-mk/site
force_orphan: true

- run: echo "Status of job = ${{ job.status }}."
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ numpy = "^1.21.2"
scipy = "^1.7.3"
matplotlib = "^3.4.3"
requests = "^2.32.3"
mkdocstrings = {extras = ["crystal", "python"], version = "^0.25.1"}

[tool.poetry.group.dev.dependencies]
flake8 = "^7.0.0"
Expand Down Expand Up @@ -142,3 +141,4 @@ rstcheck = {extras = ["sphinx"], version = "^6.2.1"}
mkdocs = "^1.6.0"
mkdocs-material = {extras = ["imaging"], version = "^9.5.27"}
mkdocs-gallery = "^0.10.1"
mkdocstrings = {extras = ["crystal", "python"], version = "^0.25.1"}

0 comments on commit 5b1c487

Please sign in to comment.