Skip to content

Give the docs workflow repo write permission #5

Give the docs workflow repo write permission

Give the docs workflow repo write permission #5

Workflow file for this run

name: Documentation
permissions:
contents: write
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: ldc-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 docs
- name: GitHub Pages
if: success() && github.ref == 'refs/heads/main'
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: docs
keep_history: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}