-
-
Notifications
You must be signed in to change notification settings - Fork 212
79 lines (68 loc) · 2 KB
/
gendoc.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
name: Automatically Generate Documentation
on:
push:
branches:
- main
jobs:
generate-documentation:
strategy:
fail-fast: false
matrix:
version:
- nightly
name: Generate Markdown Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Plenary
uses: actions/checkout@v2
with:
repository: nvim-lua/plenary.nvim
path: plenary.nvim
- name: Install Treesitter
uses: actions/checkout@v2
with:
repository: nvim-treesitter/nvim-treesitter
path: nvim-treesitter
- name: Install Neovim
uses: rhysd/action-setup-vim@v1
id: neovim
with:
neovim: true
version: ${{ matrix.version }}
- uses: leafo/gh-actions-lua@v9
with:
luaVersion: "luajit-2.1.0-beta3"
- uses: leafo/gh-actions-luarocks@v4
- name: Install all required modules
run: |
luarocks config lua_version 5.1
luarocks install --lua-version=5.1 neorg --deps-only
- name: Clone Wiki
uses: actions/checkout@v2
with:
repository: "nvim-neorg/neorg.wiki"
path: wiki/
- name: Run Documentation Generator
run: |
if ls wiki/*.md 1> /dev/null 2>&1; then
rm wiki/*.md
fi
make documentation
- name: Commit Wiki Changes
run: |
cd wiki/
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
if [[ ! -z $(git status -s) ]]; then
git add .
git commit -m "chore: autoupdate github wiki"
fi
- name: Push Wiki to Github
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repository: "nvim-neorg/neorg.wiki"
branch: master
force: true
directory: ./wiki