-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (33 loc) · 1.08 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
name: docs
on:
push:
branches: [ "master"]
pull_request:
branches: [ "master"]
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install packages
run: sudo apt update && sudo apt install -y git build-essential curl wget python3 python3-pip texlive texlive-pictures texlive-latex-extra pdf2svg poppler-utils netpbm imagemagick ghostscript
- name: Install Python packages
run: sudo pip install sphinx sphinx-rtd-theme sphinxcontrib-tikz
- name: Build documentation
run: cd docs && make html
- name: Upload math result for job 1
uses: actions/upload-artifact@v3
with:
name: html-docs
path: ./docs/_build/html
deploy:
runs-on: [self-hosted, linux, x64]
needs: build-docs
steps:
- name: Download docs
uses: actions/download-artifact@v3
with:
name: html-docs
path: html-docs
- name: Deploy
run: touch ${{ secrets.DEPLOY_PATH }}/html && rm -r ${{ secrets.DEPLOY_PATH }}/html/* && cp -rv html-docs/* ${{ secrets.DEPLOY_PATH }}/html