-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (35 loc) · 948 Bytes
/
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
40
name: Documentation
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: dmd-latest
- name: Cache DUB Artifacts
uses: actions/cache@v2
with:
path: ~/.dub
key: ${{ runner.os }}-dub-${{ hashFiles('**/dub.json') }}
restore-keys: |
${{ runner.os }}-dub-
- name: Build Documentation
run: dub build -b ddox
- name: GitHub Pages
if: success() && github.ref == 'refs/heads/main'
uses: crazy-max/[email protected]
with:
target_branch: gh-pages
build_dir: docs
keep_history: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}