Skip to content

Commit eb08a4f

Browse files
authored
Merge pull request #252 from surlymoor/new-doc-generation-method
Add a GH Workflow for the Generation and Deployment of Documentation
2 parents 5416c22 + caf34de commit eb08a4f

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/docs.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Builds the documentation, with the latest adrdox, with every push to master,
2+
# and deploys it to the gh-pages branch. Derived from Paul Backus'
3+
# https://github.com/pbackus/sumtype/blob/master/.github/workflows/docs.yml.
4+
5+
name: Documentation
6+
7+
on:
8+
push:
9+
branches:
10+
- master
11+
12+
jobs:
13+
docs:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v2
18+
with:
19+
persist-credentials: false
20+
21+
- name: Install D compiler
22+
uses: dlang-community/setup-dlang@v1
23+
with:
24+
compiler: dmd-latest
25+
26+
- name: Build documentation
27+
run: |
28+
wget https://github.com/adamdruppe/adrdox/archive/master.zip
29+
unzip master.zip
30+
pushd adrdox-master && make && popd
31+
export PATH=$PATH:$PWD/adrdox-master
32+
doc2 --genSearchIndex --genSource -o generated-docs source
33+
34+
- name: Deploy to Github Pages
35+
uses: JamesIves/[email protected]
36+
with:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
BRANCH: gh-pages
39+
FOLDER: generated-docs

0 commit comments

Comments
 (0)