-
-
Notifications
You must be signed in to change notification settings - Fork 9
39 lines (39 loc) · 1.61 KB
/
generate-docs.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
name: Build & deploy documentation
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: Update gh-pages with docs
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
- name: Install required gem dependencies
run: gem install yard --no-document
- name: Build YARD Ruby Documentation
run: yardoc
- name: Copy etc files
run: mkdir -p ./doc/yard/etc && cp ./etc/doap.* ./etc/ebnf.* ./doc/yard/etc/
- name: Copy calc example
run: mkdir -p ./doc/yard/examples/calc/doc && cp ./examples/calc/doc/calc.html ./doc/yard/examples/calc/doc
- name: Copy PEG example
run: mkdir -p ./doc/yard/examples/ebnf-peg-parser/doc && cp ./examples/ebnf-peg-parser/doc/parser.html ./doc/yard/examples/ebnf-peg-parser/doc
- name: Copy LL(1) example
run: mkdir -p ./doc/yard/examples/ebnf-ll1-parser/doc && cp ./examples/ebnf-ll1-parser/doc/parser.html ./doc/yard/examples/ebnf-ll1-parser/doc
- name: Copy ISOEBNF example
run: mkdir -p ./doc/yard/examples/isoebnf/doc && cp ./examples/isoebnf/doc/parser.html ./doc/yard/examples/isoebnf/doc
- name: Copy ABNF example
run: mkdir -p ./doc/yard/examples/abnf/doc && cp ./examples/abnf/doc/parser.html ./doc/yard/examples/abnf/doc
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/yard
publish_branch: gh-pages