-
Notifications
You must be signed in to change notification settings - Fork 755
63 lines (52 loc) · 1.79 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
name: Docs
on: [push, pull_request]
defaults:
run:
shell: bash
jobs:
docs-build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install ".[arrow]" \
-r requirements/requirements-docs.txt \
-r requirements/requirements-mxnet.txt \
-r requirements/requirements-pytorch.txt \
-r requirements/requirements-rotbaum.txt \
-r requirements/requirements-extras-statsforecast.txt
- name: Install Pandoc
run: |
sudo apt-get install pandoc
- name: Build docs
run: |
SKIP_NOTEBOOKS=${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'pr:docs-build-notebook') }}
if [ $SKIP_NOTEBOOKS = true ]; then
DOCS_BUILD_MODE=skip
else
DOCS_BUILD_MODE=release
fi
echo "Running in '$DOCS_BUILD_MODE' mode"
just mode=$DOCS_BUILD_MODE docs
- name: Configure AWS Credentials
if: ${{ github.event_name == 'push' && ( github.ref_name == 'dev' || startsWith(github.ref_name, 'v0.')) }}
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::671929771060:role/WebsitePublisher
role-session-name: docs-push
aws-region: us-east-1
- name: Publish docs
if: ${{ github.event_name == 'push' }}
run: |
aws s3 sync docs/_build/html s3://gluonts-website/${GITHUB_REF#refs/heads/} --delete --acl bucket-owner-full-control