Skip to content

Commit

Permalink
PR Doc build (zhanghang1989#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghang1989 committed Apr 6, 2020
1 parent e312950 commit 229dde7
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 6 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build_sphix_master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Build Docs

on:
push:
branches: [ master ]

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: seanmiddleditch/gha-setup-ninja@master

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.7

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy -I
pip install pytest torch
- name: Install package
run: |
pip install -e .
- name: Install Sphix Dependencies
run: |
cd docs/
pip install -r requirements.txt
- name: Build Sphinx docs
run: |
cd docs/
make html
touch build/html/.nojekyll
# https://github.com/marketplace/actions/github-pages
- name: Deploy
if: success()
uses: crazy-max/ghaction-github-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
build_dir: docs/build/html/
target_branch: gh-pages
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[![PyPI Pre-release](https://img.shields.io/badge/pypi--prerelease-v1.1.0-ff69b4.svg)](https://pypi.org/project/torch-encoding/#history)
[![Upload Python Package](https://github.com/zhanghang1989/PyTorch-Encoding/workflows/Upload%20Python%20Package/badge.svg)](https://github.com/zhanghang1989/PyTorch-Encoding/actions)
[![Downloads](http://pepy.tech/badge/torch-encoding)](http://pepy.tech/project/torch-encoding)

[![Build Docs](https://github.com/zhanghang1989/PyTorch-Encoding/workflows/Build%20Docs/badge.svg)](https://github.com/zhanghang1989/PyTorch-Encoding/actions)
# PyTorch-Encoding

created by [Hang Zhang](http://hangzh.com/)
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sphinx
sphinxcontrib-googleanalytics
-e git://github.com/snide/sphinx_rtd_theme.git#egg=sphinx_rtd_theme
sphinx-rtd-theme
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@
'sphinx.ext.mathjax',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinxcontrib.googleanalytics',
# 'sphinxcontrib.googleanalytics',
]

napoleon_use_ivar = True

googleanalytics_id = 'UA-54746507-1'
googleanalytics_enabled = True
# googleanalytics_id = 'UA-54746507-1'
# googleanalytics_enabled = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def run(self):
'numpy',
'tqdm',
'nose',
'torch>=0.4.0',
'torch>=1.4.0',
'torchvision>=0.5.0',
'Pillow',
'scipy',
'requests',
Expand Down

0 comments on commit 229dde7

Please sign in to comment.