-
Notifications
You must be signed in to change notification settings - Fork 19
69 lines (61 loc) · 2.03 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
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
name: 'Documentation CI + CD'
on:
workflow_dispatch:
push:
branches:
- main
paths:
- repentogon/resources/scripts/enums_ex.lua
- docs/**
permissions:
contents: write
jobs:
enums_update:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
- run: pip install -r ./tools/requirements.txt
- name: Convert enums to mkdocs
run: python ./tools/enums2mkdocs.py
code_checks:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install dependencies
run: npm install @actions/core
- name: Run code checks
run: node ./docs/scripts/code_checks.js
shell: bash
deployment:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- uses: oleksiyrudenko/gha-git-credentials@v2-latest
with:
token: '${{ secrets.GITHUB_TOKEN }}'
- name: Install PIP packages
run: |
pip install -r ./docs/requirements.txt
- name: Deploy Documentation
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
cd ./docs
mkdocs gh-deploy --force