Process documentation with Handlebars #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |