forked from nvim-neorg/neorg
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (60 loc) · 1.71 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
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 }}
- 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