-
Notifications
You must be signed in to change notification settings - Fork 659
67 lines (65 loc) · 2.14 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:
- "docs/mkdocs.yml"
# Publish docs weekly
schedule:
- cron: '0 9 * * 1'
workflow_dispatch:
jobs:
documentation:
if: github.repository == 'deepjavalibrary/djl'
runs-on: ubuntu-latest
steps:
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: 17
- name: Set up Python3
uses: actions/setup-python@v4
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==1.4.3 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@v3
- name: add mybinder link
run: |
python3 tools/scripts/add_online_runner.py
- 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: run Notebooks
run: |
cd docs/demos/jupyter
bash test_notebook.sh
- 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-node16
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 "/*"