-
Notifications
You must be signed in to change notification settings - Fork 245
62 lines (52 loc) · 1.62 KB
/
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
60
61
62
name: Deploy
on:
push:
branches:
- trunk
paths:
- 'doc/**'
- '.github/workflows/docs.yml'
jobs:
##############################################################################
# build documentation
##############################################################################
build-doc:
name: Push documentation to website
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: "Setup"
run: |
sudo apt-get install -y python3-sphinx
sphinx-build --version
- name: "Build documentation"
run: |
cd doc
make html SPHINXOPTS="-W -j auto"
- name: "Build pdf documentation"
uses: dante-ev/latex-action@latest
with:
root_file:
compiler:
args:
entrypoint: doc/entrypoint.sh
- name: "Create a tarball of the documentation"
run: |
cd doc/build
mv html doc
cp latex/Flint.pdf doc
tar -czvf doc.tar.gz doc
- name: "Setup SSH key"
uses: shimataro/[email protected]
with:
key: ${{ secrets.SSH_KEY }}
name: id_ed25519
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- name: "Push documentation to server"
run: |
cd doc/build
ssh -t [email protected] 'mkdir ~/tmp'
scp doc.tar.gz [email protected]:~/tmp
ssh -t [email protected] 'cd ~/tmp && tar -xf doc.tar.gz && rm -rf ~/apps/flintlib_org/doc && mv doc ~/apps/flintlib_org && cd ~ && rm -rf ~/tmp'