Skip to content

Commit 7da9870

Browse files
committed
add publish-log4brains GitHub Action
- Added a new GitHub Actions workflow to publish Log4brains - The workflow triggers on push to the main branch - It checks out the repository, sets up Node.js, installs Log4brains, builds the documentation, and deploys it to GitHub Pages
1 parent c343a35 commit 7da9870

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish Log4brains
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
build-and-publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
persist-credentials: false # required by JamesIves/github-pages-deploy-action
13+
fetch-depth: 0 # required by Log4brains to work correctly (needs the whole Git history)
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: lts/*
17+
- name: Install and Build Log4brains
18+
run: |
19+
npm install -g log4brains
20+
log4brains build --basePath /${GITHUB_REPOSITORY#*/}
21+
- name: Deploy
22+
uses: JamesIves/github-pages-deploy-action@3.7.1
23+
with:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
BRANCH: gh-pages
26+
FOLDER: .log4brains/out
27+
TARGET_FOLDER: log4brains

0 commit comments

Comments
 (0)