forked from deepjavalibrary/djl
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (65 loc) · 2.1 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
57
58
59
60
61
62
63
64
65
66
67
name: Docs
on:
pull_request:
paths:
- "**.ipynb"
- "docs/mkdocs.yml"
# Publish docs weekly
schedule:
- cron: '0 9 * * 1'
workflow_dispatch:
jobs:
documentation:
if: github.repository == 'deepjavalibrary/djl'
runs-on: ubuntu-18.04
steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Set up Python3
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install CN fonts
run: sudo apt-get update && sudo apt-get install fonts-arphic-uming
- name: install Python Dependencies
run: pip3 install nbconvert mkdocs mkdocs-exclude mknotebooks mkdocs-material jupyter Pygments Markdown
- name: Install IJava kernel
run: |
git clone https://github.com/frankfliu/IJava.git
cd IJava/
./gradlew installKernel
- name: checkout repo
uses: actions/checkout@v2
- name: add mybinder link
run: |
python3 tools/scripts/add_online_runner.py
- name: run Notebooks
run: |
cd jupyter
bash test_notebook.sh
- name: clone demos
run: |
cd docs
git clone https://github.com/deepjavalibrary/djl-demo.git demos
- name: clone serving
run: |
cd docs
git clone https://github.com/deepjavalibrary/djl-serving.git serving
- name: build docs
run: |
cd docs
mkdocs build --site-dir ../../site
- name: Configure AWS Credentials
if: github.event_name != 'pull_request'
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: Copy files to S3 with the AWS CLI
if: github.event_name != 'pull_request'
run: |
aws s3 sync ../site s3://djl-ai/documentation/nightly --delete
aws cloudfront create-invalidation --distribution-id E733IIDCG0G5U --paths "/*"