-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (51 loc) · 1.52 KB
/
publish-book.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
---
name: Publish Book
on:
# Manually trigger workflow
workflow_dispatch:
# Run work flow conditional on linter workflow success
workflow_run:
workflows:
- "MegaLinter"
paths:
- "docs/**"
- "includes/**"
- "overrides/**"
- "mkdocs.yaml"
branches:
- main
types:
- completed
permissions:
contents: write
jobs:
publish-book:
name: MkDocs Publish
runs-on: ubuntu-latest
steps:
- run: echo "🚀 Job automatically triggered by ${{ github.event_name }}"
- run: echo "🐧 Job running on ${{ runner.os }} server"
- run: echo "🐙 Using ${{ github.ref }} branch from ${{ github.repository }} repository"
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
sparse-checkout: |
docs
overrides
- run: echo "🐙 ${{ github.repository }} repository sparse-checkout to the CI runner."
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Cache
uses: actions/cache@v4
with:
key: ${{ github.ref }}
path: .cache
- run: pip install mkdocs-material mkdocs-callouts mkdocs-glightbox mkdocs-git-revision-date-localized-plugin mkdocs-redirects pillow cairosvg
- run: mkdocs gh-deploy --force
- run: echo "🐙 ."
# Summary and status
- run: echo "🎨 MkDocs Publish Book workflow completed"
- run: echo "🍏 Job status is ${{ job.status }}."