-
Notifications
You must be signed in to change notification settings - Fork 44
77 lines (64 loc) · 1.97 KB
/
deploy.yaml
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
75
76
77
name: Publish docs via GitHub Pages
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-pdf:
name: Create PDFs
runs-on: ubuntu-22.04
steps:
- name: Install Deps
run: |
sudo apt-get update
sudo apt-get install texlive-xetex fonts-noto-core
wget -nv https://github.com/jgm/pandoc/releases/download/2.11.4/pandoc-2.11.4-1-amd64.deb
sudo apt-get install ./pandoc-2.11.4-1-amd64.deb
- name: Check out the repository
uses: actions/checkout@v3
- name: Change to repository & Build PDFs
run: |
cd $GITHUB_WORKSPACE
./makepdf.sh -v
- name: Upload PDF Artifact
uses: actions/upload-artifact@v3
with:
name: PDFs
path: pdf
if-no-files-found: error
build-mkdocs-conditional-deploy:
name: Build & conditionally deploy docs
needs: [build-pdf]
runs-on: ubuntu-22.04
steps:
- name: Checkout main
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Create dir for PDFs
run: mkdir docs/pdf
- name: Download PDF Artifact
uses: actions/download-artifact@v3
with:
name: PDFs
path: docs/pdf/
- name: Install Lint Dependencies
run: sudo gem install mdl -v 0.4.0
- name: Lint Markdown
run: mdl -s markdownlint-rules.rb
- name: Install mkdocs Dependencies
run: pip install -r requirements.txt
- name: Build mkdocs
run: mkdocs build -s
- name: Deploy mkdocs
if: ${{ github.event_name == 'push' }}
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"
mkdocs gh-deploy --verbose