-
Notifications
You must be signed in to change notification settings - Fork 33
59 lines (47 loc) · 1.62 KB
/
publish-docs.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
name: Publish Docs
on:
push:
branches: [master]
jobs:
api-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: "3.9"
- name: Setup Linux
if: runner.os == 'linux'
run: |
sudo apt-get install -y cmake libsndfile1
- name: Install Ludwig
run: |
pip install ludwig
pip install ludwig[viz]
- name: Set Ludwig version env
run: |
echo "ludwig_version=$(python -c "import ludwig; print('.'.join(ludwig.__version__.split('.')[:2]))")" >> $GITHUB_ENV
- name: Install dependencies
run: pip install -r requirements.txt
- name: Setup doc deploy
run: |
git config --global user.name ci-bot
git config --global user.email [email protected]
- name: Publish docs
run: mike deploy --push --update-aliases ${{ env.ludwig_version }} latest --no-redirect --title="${{ env.ludwig_version }} (latest)"
- name: Copy sitemap to root
run: |
git checkout gh-pages
cp ${{ env.ludwig_version }}/sitemap.xml sitemap.xml
- name: Copy robots.txt to root
run: |
git checkout gh-pages
cp ${{ env.ludwig_version }}/robots.txt robots.txt
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Copying sitemap from version to make it easy for search engines to find our documentation.
branch: gh-pages
push_options: --force