-
Notifications
You must be signed in to change notification settings - Fork 130
56 lines (52 loc) · 1.55 KB
/
docs.yml
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
48
49
50
51
52
53
54
55
56
name: docs
on:
pull_request:
push:
branches:
- master
schedule:
- cron: '0 0 * * *'
jobs:
docs:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.8]
tag: ["build", "push"]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: ci/install_dependencies.sh
- name: Install TorchANI
run: python setup.py install
- name: Download data files
run: ./download.sh
# build docs
- name: Build documents
run: sphinx-build docs build
# try deploying to aiqm/torchani-test-docs
- name: Set up environments
run: |
mkdir -p ~/.ssh
echo ${{secrets.zasdfgbnm_bot_private_key}} | base64 -d > ~/.ssh/id_rsa
chmod 0600 ~/.ssh/id_rsa
echo ${{secrets.zasdfgbnm_bot_public_key}} > ~/.ssh/id_rsa.pub
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
git config --global user.email "zasdfgbnm-bot@example.com"
git config --global user.name "zasdfgbnm-bot"
- name: Deploy
run: |
[ ${{ matrix.tag }} == "push" ] || exit 0 # exit when build
git clone git@github.com:aiqm/torchani-test-docs.git deploy_dir -b gh-pages
rm -rf deploy_dir/*
touch deploy_dir/.nojekyll
cp -r build/* deploy_dir
cd deploy_dir
git add .
git commit -m "update"
git push --force