-
Notifications
You must be signed in to change notification settings - Fork 15
38 lines (35 loc) · 1.34 KB
/
sphinx_build.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
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
name: "Build documentation"
# This workflow is triggered on pushes to the repository.
on:
push:
branches:
- main
pull_request:
jobs:
build:
# This job runs on Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
# This step uses ammaraskar's Sphinx Build Action: https://github.com/ammaraskar/sphinx-action
- uses: ammaraskar/sphinx-action@master
with:
docs-folder: "docs/"
# list of shell commands to prepare environment before build
pre-build-command: "pip install -r docs/requirements.txt && pip3 install --force-reinstall torch==2.0.1+cu117 -f https://download.pytorch.org/whl/cu117/torch_stable.html && pip install ."
# Create an artifact of the html output using Github action: https://github.com/actions/upload-artifact
- uses: actions/upload-artifact@v1
with:
name: DocumentationHTML
path: docs/build/html/
- name: Deploy docs
uses: JamesIves/github-pages-deploy-action@releases/v3
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
with:
ACCESS_TOKEN: ${{ secrets.DEPLOY_ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: docs/build/html