-
-
Notifications
You must be signed in to change notification settings - Fork 1
103 lines (86 loc) · 3.53 KB
/
documentation.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# ---------------------------------------------------------------------------------------
# @parent : github workflow
# @desc : build documentation
# @author : Aetherinox
# @url : https://github.com/Aetherinox
# ---------------------------------------------------------------------------------------
name: "📒 Docs › Build"
run-name: "📒 Docs › Build"
# ---------------------------------------------------------------------------------------
# environment variables
# ---------------------------------------------------------------------------------------
env:
ASSIGN_USER: Aetherinox
BOT_NAME_1: AdminServ
BOT_NAME_2: AdminServX
BOT_NAME_3: EuropaServ
BOT_NAME_DEPENDABOT: dependabot[bot]
# ---------------------------------------------------------------------------------------
# triggers
# ---------------------------------------------------------------------------------------
on:
release:
types:
- published
push:
paths:
- docs/**
workflow_dispatch:
schedule:
- cron: "0 */12 * * *"
# ---------------------------------------------------------------------------------------
# jobs
# ---------------------------------------------------------------------------------------
jobs:
build-docs:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
environment:
name: Orion
steps:
# ---------------------------------------------------------------------------------------
# Checkout
# ---------------------------------------------------------------------------------------
- name: "☑️ Checkout"
uses: actions/checkout@v4
# ---------------------------------------------------------------------------------------
# Setup Python
# ---------------------------------------------------------------------------------------
- name: "🐍 Setup Python"
id: task_build_python_setup
uses: actions/setup-python@v5
with:
python-version: 3.x
# ---------------------------------------------------------------------------------------
# Build Documentation
# ---------------------------------------------------------------------------------------
- name: >-
📕 Build Documentation
id: task_build_docs
run: |
export DOCS_NAME=${{ secrets.DOCS_NAME }}
export DOCS_SECRET_L1=${{ secrets.DOCS_SECRET_L1 }}
export DOCS_SECRET_L2=${{ secrets.DOCS_SECRET_L2 }}
export GH_TOKEN=${{ secrets.ADMINSERV_TOKEN }}
pip install mkdocs
pip install mkdocs-material
pip install mike
pip install mkdocs-git-committers-plugin-2
pip install mkdocs-encryptcontent-plugin
pip install mkdocs-redirects mkdocs-glightbox pymdown-extensions mkdocs-git-revision-date-localized-plugin mkdocs-git-authors-plugin mkdocs-link-embeds-plugin
cd docs
mkdocs build
dir
env:
GH_TOKEN: ${{ secrets.ADMINSERV_TOKEN }}
# ---------------------------------------------------------------------------------------
# Deploy
# ---------------------------------------------------------------------------------------
- name: "💽 Deploy"
id: task_build_deploy
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.ADMINSERV_TOKEN_CL }}
publish_dir: ./docs/site