-
Notifications
You must be signed in to change notification settings - Fork 4.5k
62 lines (53 loc) · 1.89 KB
/
documentation.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
name: Publish Documentation
on:
push:
branches:
- '[0-9]+.[0-9]+.x'
- 'master'
tags:
- '**'
# SECRETS
# - GITHUB_DOCS_KEY: generated locally, added to github repo (public key)
# `ssh-keygen -t rsa -b 4096 -C "Github CI Docs Key" -N "" -f key`
# - GITHUB_TOKEN: (default, from github actions)
jobs:
docs:
name: Build Docs
runs-on: ubuntu-latest
steps:
- name: Checkout git repository 🕝
uses: actions/checkout@v2
- name: Set up Python 3.6 🐍
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Load PIP Cached artifacts ⬇
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-3.6-pip-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-3.6-pip-
- name: Install Dependencies 📦
env:
RASABASTER: rasabaster-0.7.23.tar.gz
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -sSL -o $RASABASTER "https://storage.googleapis.com/docs-theme/${RASABASTER}?q=$(date +%s%N)"
pip install $RASABASTER
pip install -r requirements.txt
pip install -r requirements-docs.txt
pip install git+https://${GITHUB_TOKEN}:x-oauth-basic@github.com/RasaHQ/sphinxcontrib-versioning.git@version_list
pip install -e .
pip list
- name: Build & Publish Docs 🏃♀️
env:
GITHUB_DOCS_KEY: ${{ secrets.GITHUB_DOCS_KEY }}
run: |
eval "$(ssh-agent -s)"; touch docs_key; chmod 0600 docs_key
echo "$GITHUB_DOCS_KEY" > "docs_key"
ssh-add docs_key
git config --global user.email "builds@github-ci.com"
git config --global user.name "GitHub CI"
git remote set-url --push origin "git@github.com:${{github.repository}}"
sphinx-versioning push docs docs . -- -b dirhtml -A html_theme=rasabaster