Skip to content

Commit

Permalink
Merge pull request #7 from openweathermap/bugfix/docs-cleanup
Browse files Browse the repository at this point in the history
Bugfix/docs cleanup
  • Loading branch information
singular0 authored Aug 9, 2023
2 parents 1977dbc + cdee2f2 commit a199522
Show file tree
Hide file tree
Showing 16 changed files with 1,785 additions and 1,791 deletions.
66 changes: 0 additions & 66 deletions .github/workflows/docs.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
black ./${{ env.PYTHON_PACKAGE_NAME }}
flake8 ./${{ env.PYTHON_PACKAGE_NAME }}
mypy ./${{ env.PYTHON_PACKAGE_NAME }} --install-types --non-interactive --config-file pyproject.toml
doc8 ./docs
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1

Expand Down Expand Up @@ -210,6 +211,50 @@ jobs:
with:
path: dist/*.tar.gz

build_docs:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Load virtual environment
uses: actions/cache@v2
with:
path: venv
key: ${{ runner.os }}-venv-${{ env.PYTHON_IMAGE }}-${{ hashFiles('requirements.txt', 'requirements_dev.txt') }}
- name: Make Sphinx docs
run: |
source venv/bin/activate
cd ./docs
make html
ls -la _build/html
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: docs/_build/html

publish_docs:
needs: build_docs
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
force: true
directory: docs/_build/html

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions doc8.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[doc8]

max-line-length=99
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
# html_static_path = ["_static"]
# html_css_files = ["custom.css"]
# -- Options for HTMLHelp output ------------------------------------------

Expand Down
Loading

0 comments on commit a199522

Please sign in to comment.