-
Notifications
You must be signed in to change notification settings - Fork 135
Expand file tree
/
Copy pathdeploy-jupyter-book-preview.yml
More file actions
47 lines (41 loc) · 1.48 KB
/
deploy-jupyter-book-preview.yml
File metadata and controls
47 lines (41 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: deploy-book
# Only run this on PRs
on:
pull_request:
branches: [ main ]
workflow_dispatch:
# This job installs dependencies, build the book, and pushes it to `gh-pages`
jobs:
deploy-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: s-weigand/setup-conda@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
conda install -c conda-forge pygraphviz
cd package && python -m pip --use-deprecated=legacy-resolver --no-cache-dir install .
pip install torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.12.0+cpu.html
- name: Build dmol-book package
run: |
pip install build
cd package && python -m build --sdist --wheel --outdir dist/ .
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
continue-on-error: true
with:
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: package/dist/
- name: Build the book
run: env TF_CPP_MIN_LOG_LEVEL=3 jupyter-book build .
- name: Deploy Jupyter book to GitHub pages
uses: peaceiris/actions-gh-pages@v3.9.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/html
#force_orphan: true
keep_files: true
destination_dir: ${{ steps.myref.outputs.branch }}
cname: dmol.pub