Skip to content

[Doc] Take automatic version updates in requirements.txt (#112) #173

[Doc] Take automatic version updates in requirements.txt (#112)

[Doc] Take automatic version updates in requirements.txt (#112) #173

Workflow file for this run

# 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