-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (61 loc) · 1.74 KB
/
publish_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
63
64
65
66
67
68
69
70
71
72
73
74
name: Publish effector documentation to xai-effector/effector.github.io
on:
push:
branches:
- main
tags:
- v*
jobs:
build-documentation:
runs-on: ubuntu-latest
steps:
- name: Checkout current repo
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocstrings mkdocstrings-python mkdocs-material
- name: Build docs
run: |
cd docs
mkdocs build
cd ..
- name: Save site site as artifact
uses: actions/upload-artifact@v2
with:
name: docs-site
path: docs/site
push-site:
name: Copy site to effector.github.io
needs:
- build-documentation
runs-on: ubuntu-latest
steps:
- name: Download the site as artifact
uses: actions/download-artifact@v2
with:
name: docs-site
path: site
- name: Clone xai-effector.github.io and checkout gh-pages branch
uses: actions/checkout@v2
with:
repository: xai-effector/xai-effector.github.io
ref: gh-pages
token: ${{ secrets.EFFECTOR_GITHUB_API_KEY }}
path: xai-effector.github.io
- name: rm old site and copy new site
run: |
rm -rf xai-effector.github.io/*
cp -r site/* xai-effector.github.io
- name: commit and push
run: |
cd xai-effector.github.io
git config --global user.email "ntipakos@gmail.com"
git config --global user.name "ntipakos"
git add .
git commit -m "Update site from ntipakos/effector"
git push --force origin gh-pages