Skip to content

Commit

Permalink
Merge pull request mit-ll-responsible-ai#65 from mit-ll-responsible-a…
Browse files Browse the repository at this point in the history
…i/docs-workflow

add github workflow for publishing docs
  • Loading branch information
rsokl authored Jun 8, 2021
2 parents 0f06c7a + 38c7a99 commit 641c38c
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: github pages

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'

- name: Upgrade pip
run: |
# install pip=>20.1 to use "pip cache dir"
python3 -m pip install --upgrade pip
- name: Get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install package
run: python3 -m pip install .

- name: Install docs dependencies
run: pip install -r ./docs/requirements.txt

- name: Run sphinx
run: (cd ./docs/ && make html)

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
destination_dir: ./docs
publish_dir: ./docs/build/html

0 comments on commit 641c38c

Please sign in to comment.