haystack/.github/workflows/deploy_website.yml
Markus Paff 3af3ee1a12
Automate docstring and tutorial generation with every push to master (#718)
* automate docstring and tutorial generation with every push to master

* test CI for current branch

* fixed yaml syntax

* add setupttools to install process

* checkout repo

* fixed command for shell script

* install wheel as it is needed for CI

* install mkdocs

* test without shell script

* use package from github actions

* test other configuration

* back to right config

* cleaning script
2021-01-11 16:25:43 +01:00

46 lines
1.3 KiB
YAML

name: Deploy website
# Controls when the action will run. Triggers the workflow on push
# events but only for the master branch
on:
push:
branches: [ master, benchmarks ]
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install 'pydoc-markdown>=3.0.0,<4.0.0'
pip install mkdocs
pip install jupytercontrib
# Generates the docstrings and tutorials so that we have the latest for the deployment
- name: Generate Docstrings and Tutorials
run: |
cd docs/_src/api/api/
./generate_docstrings.sh
cd ../../tutorials/tutorials/
python3 convert_ipynb.py
# Creates dispatch event for haystack-website repo
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
repository: deepset-ai/haystack-website
event-type: deploy-website
client-payload: '{}'