Deploy a new doc website (#338)

A new documentation website. And:

* add actions for doc

* update docstr

* installation instructions for doc dev

* unify README and Getting Started

* rename notebook

* doc about best_model_for_estimator #340

* docstr for keep_search_state #340

* DNN

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
Co-authored-by: Z.sk <shaokunzhang@psu.edu>
This commit is contained in:
Chi Wang
2021-12-16 17:11:33 -08:00
committed by GitHub
parent 671ccbbe3f
commit efd85b4c86
91 changed files with 12277 additions and 752 deletions

88
.github/workflows/deploy-website.yml vendored Normal file
View File

@@ -0,0 +1,88 @@
name: docs
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
jobs:
checks:
if: github.event_name != 'push'
runs-on: ubuntu-latest
defaults:
run:
working-directory: website
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14.x
# cache: yarn
# cache-dependency-path: '**/yarn.lock'
- name: setup python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: pydoc-markdown install
run: |
python -m pip install --upgrade pip
pip install pydoc-markdown
- name: pydoc-markdown run
run: |
pydoc-markdown
- name: Test Build
run: |
if [ -e yarn.lock ]; then
yarn install --frozen-lockfile
yarn build
elif [ -e package-lock.json ]; then
npm ci
npm run build
else
npm i --legacy-peer-deps
npm run build
fi
gh-release:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
defaults:
run:
working-directory: website
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14.x
# cache: yarn
# cache-dependency-path: '**/yarn.lock'
- name: setup python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: pydoc-markdown install
run: |
python -m pip install --upgrade pip
pip install pydoc-markdown
- name: pydoc-markdown run
run: |
pydoc-markdown
- name: Build website
run: |
if [ -e yarn.lock ]; then
yarn install --frozen-lockfile
yarn build
elif [ -e package-lock.json ]; then
npm ci
npm run build
else
npm i --legacy-peer-deps
npm run build
fi
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./website/build

View File

@@ -70,27 +70,27 @@ jobs:
file: ./coverage.xml
flags: unittests
docs:
# docs:
runs-on: ubuntu-latest
# runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Compile documentation
run: |
pip install -e .
python -m pip install sphinx sphinx_rtd_theme
cd docs
make html
- name: Deploy to GitHub pages
if: ${{ github.ref == 'refs/heads/main' }}
uses: JamesIves/github-pages-deploy-action@3.6.2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: docs/_build/html
CLEAN: true
# steps:
# - uses: actions/checkout@v2
# - name: Setup Python
# uses: actions/setup-python@v2
# with:
# python-version: '3.8'
# - name: Compile documentation
# run: |
# pip install -e .
# python -m pip install sphinx sphinx_rtd_theme
# cd docs
# make html
# - name: Deploy to GitHub pages
# if: ${{ github.ref == 'refs/heads/main' }}
# uses: JamesIves/github-pages-deploy-action@3.6.2
# with:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# BRANCH: gh-pages
# FOLDER: docs/_build/html
# CLEAN: true