-
-
Notifications
You must be signed in to change notification settings - Fork 148
48 lines (46 loc) · 1.33 KB
/
docgen.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
name: docgen
on:
push:
branches:
- master
paths:
- docs/**
- lua/orgmode/api/**
jobs:
docgen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- name: Install pandoc
uses: pandoc/actions/setup@v1
with:
version: 3.5
- name: Install Neovim
uses: rhysd/action-setup-vim@v1
id: neovim
with:
neovim: true
version: v0.9.5
- name: Install lemmy-help
run: |
curl -Lq https://github.com/numToStr/lemmy-help/releases/latest/download/lemmy-help-x86_64-unknown-linux-gnu.tar.gz | tar xz
echo "$PWD" >> $GITHUB_PATH
- name: Generate api docs
run: make api_docs
- name: Generate vim docs
run: make vim_docs
- name: Commit changes
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
COMMIT_MSG: |
chore(docs): Update docs
run: |
rm lemmy-help
git config user.name github-actions
git config user.email [email protected]
git add doc/orgmode.txt
git add doc/orgmode_api.txt
# Only commit and push if we have changes
git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push)