Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs deployment #11

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
42 changes: 42 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Docs

on:
push:
branches:
- main
- docs

jobs:
build:
runs-on: ${{ matrix.os }}
permissions:
contents: write

strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: 'pyproject.toml'

- name: Install dependencies
run: |
make develop

- name: Build docs
run: |
make docs

- name: Deploy to gh-pages branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ __pycache__/
build/
develop-eggs/
dist/
*.tar.gz
downloads/
eggs/
.eggs/
Expand Down Expand Up @@ -127,3 +128,8 @@ dmypy.json

# Pyre type checker
.pyre/


# Mac files
.DS_Store

7 changes: 7 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": []
}
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ dist: clean build dist-build dist-check ## Build dists
publish: # Upload python assets
echo "would usually run python -m twine upload dist/* --skip-existing"

########
# DOCS #
########
docs: ## build the documentation
make -C docs html

#########
# CLEAN #
#########
Expand All @@ -96,4 +102,4 @@ help:
print-%:
@echo '$*=$($*)'

.PHONY: develop build install lint lints format fix check checks annotate test coverage show-coverage tests show-version patch minor major dist-build dist-check dist publish deep-clean clean help
.PHONY: develop build install lint lints format fix check checks annotate test coverage show-coverage tests show-version patch minor major dist-build dist-check dist publish deep-clean clean help docs
Binary file removed dist/fantasyfootball-crawler-0.1.0.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion website/docs/Makefile → docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
SOURCEDIR = .
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
Expand Down
3 changes: 1 addition & 2 deletions website/docs/source/conf.py → docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html
import os
import sys
import bs4
sys.path.insert(0, os.path.abspath('../../../fantasyfootball-crawler'))
sys.path.insert(0, os.path.abspath('../'))
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

Expand Down
2 changes: 1 addition & 1 deletion website/docs/source/index.rst → docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
contain the root `toctree` directive.

.. include:: intro.rst
.. automodule:: ff_functions
.. automodule:: fantasyfootball_crawler.ff_functions
:members:
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ develop = [
"mypy",
"pytest>=4.3.0",
"pytest-cov>=2.6.1",
"sphinx",
"twine",
"wheel",
]
Expand Down
Binary file removed website/.DS_Store
Binary file not shown.
Binary file removed website/docs/.DS_Store
Binary file not shown.
Binary file removed website/docs/build/.DS_Store
Binary file not shown.
Binary file removed website/docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file removed website/docs/build/doctrees/index.doctree
Binary file not shown.
Binary file removed website/docs/build/doctrees/intro.doctree
Binary file not shown.
4 changes: 0 additions & 4 deletions website/docs/build/html/.buildinfo

This file was deleted.

Binary file removed website/docs/build/html/.doctrees/environment.pickle
Binary file not shown.
Binary file removed website/docs/build/html/.doctrees/index.doctree
Binary file not shown.
8 changes: 0 additions & 8 deletions website/docs/build/html/_sources/index.rst.txt

This file was deleted.

25 changes: 0 additions & 25 deletions website/docs/build/html/_sources/intro.rst.txt

This file was deleted.

Loading