Skip to content

adding github actions deployment #14

adding github actions deployment

adding github actions deployment #14

name: Publish Log4brains
on:
push:
branches: ["main"]
paths:
- "docs/adr/**"
- ".log4brains.yml"
- ".github/workflows/publish-log4brains.yml"
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # required by Log4brains to work correctly (needs the whole Git history)
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: "14"
- name: Install and Build Log4brains
run: |
npm install -g log4brains
log4brains build --basePath "/${{ github.event.repository.name }}"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: .log4brains/out
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4