-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (60 loc) · 1.59 KB
/
docs_workflow.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
name: Docs
permissions:
contents: write
on:
push:
branches:
- "main"
tags:
- "*"
pull_request:
paths:
- "Docs/**"
- ".github/workflows/**"
#
jobs:
make_docs:
runs-on: ubuntu-latest
name: Build Docs
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
architecture: x64
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: sudo apt update && sudo apt install texlive-latex-recommended texlive-latex-extra texlive-pictures pandoc rename latexmk
- name: Install docs requirements
run: pip install -r Docs/requirements.txt
- name: Build pdf
run: cd Docs && make
#
- run: mv Docs/_build/latex/*.pdf Docs/_build/latex/RoomBouy.pdf
- uses: actions/upload-artifact@v2
with:
name: ProjectDocs
path: Docs/_build/latex/RoomBouy.pdf
#
publish_docs:
# Only run on tags
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
name: Publish Docs
needs: [make_docs]
steps:
- uses: actions/download-artifact@v2
with:
name: ProjectDocs
- name: Upload Docs to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "*.pdf"
tag: ${{ github.ref }}
overwrite: true
prerelease: true
#
body: "Concord Robotics, Automated with github ci/cd."
file_glob: true