Skip to content

Commit 7c909ba

Browse files
committed
Docs workflow
1 parent e859228 commit 7c909ba

File tree

2 files changed

+47
-17
lines changed

2 files changed

+47
-17
lines changed

.github/workflows/docs.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Docs Generator
2+
3+
on:
4+
push:
5+
paths:
6+
- 'README.md'
7+
- '.github/workflows/docs.yml'
8+
9+
jobs:
10+
generateDOC:
11+
name: Docs Generator
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: technote-space/toc-generator@v2
16+
with:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
MAX_HEADER_LEVEL: 3
19+
FOLDING: true
20+
- name: Download mdsplit
21+
uses: carlosperate/[email protected]
22+
id: download-mdsplit
23+
with:
24+
file-url: 'https://github.com/alandefreitas/mdsplit/releases/download/v0.0.1/Executable.Linux.zip'
25+
file-name: 'mdsplit.zip'
26+
location: '.'
27+
- name: Unzip mdsplit
28+
run: |
29+
unzip mdsplit.zip
30+
rm -f mdsplit.zip
31+
sudo chmod +x mdsplit
32+
ls
33+
- name: Generate Docs
34+
run: ./mdsplit -r alandefreitas/matplotplusplus
35+
- name: Commit Docs
36+
run: |
37+
git fetch
38+
git add docs
39+
git config --local user.email "[email protected]"
40+
git config --local user.name "GitHub Action"
41+
git commit -m "Update Docs" -a
42+
continue-on-error: true
43+
- name: Push changes
44+
uses: ad-m/github-push-action@master
45+
if: ${{ success() }}
46+
with:
47+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/toc.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)