-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (42 loc) · 1.33 KB
/
publish_log4brains.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
41
42
43
44
45
46
---
name: Publish ADR Documentation via Log4brains
on: # yamllint disable-line rule:truthy
push:
branches:
- main # forward-compatibility with new GitHub default branch naming
- master # backward-compatibility with old GitHub default branch naming
workflow_dispatch:
pull_request:
env:
BUILD_DIR: .log4brains/out
BENCHMARKS_DIR: dev
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
pages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false # required by JamesIves/github-pages-deploy-action
fetch-depth: 0 # required by Log4brains to work correctly (needs the whole Git history)
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: "14"
- name: Install and Build Log4brains
run: |
npm install -g log4brains
log4brains build \
--basePath "/${GITHUB_REPOSITORY#*/}/adl" \
--out "${BUILD_DIR}/adl" && \
touch "${BUILD_DIR}/.nojekyll" || true
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.6.0
with:
branch: gh-pages
folder: ${{ env.BUILD_DIR }}
clean-exclude: ${{ env.BENCHMARKS_DIR }}