-
-
Notifications
You must be signed in to change notification settings - Fork 136
46 lines (44 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
name: docgen
on:
push:
branches:
- master
jobs:
docgen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- uses: actions/setup-go@v5
with:
go-version: '^1.17.1'
- name: Install md2vim
run: go install git.foosoft.net/alex/md2vim@latest
- 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 docs
- name: Commit changes
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
COMMIT_MSG: |
[docgen] 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)