Skip to content

docs

docs #1348

Workflow file for this run

name: docs
run-name: docs
# declare default permissions
permissions: read-all
on:
# enable manual run via GitHub UI
workflow_dispatch:
# enable trigger via remote call webhook
repository_dispatch:
types: [update-docs]
# enable run on "standard" updates to main branch
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CORE: ./core
EXAMPLES: ./examples
DOCS: ./docs
DIST: ./docs/dist
SITE: ./docs/src/content/docs
TMP: ./docs/tmp
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
with:
repository: defenseunicorns/pepr
path: ${{ env.CORE }}
fetch-depth: 0 # pull history to get version tags
- uses: actions/checkout@v6
with:
repository: defenseunicorns/pepr-excellent-examples
path: ${{ env.EXAMPLES }}
- uses: actions/checkout@v6
with:
repository: defenseunicorns/pepr-docs
path: ${{ env.DOCS }}
- name: Setup Node.js
uses: actions/setup-node@v6.4.0
with:
node-version: "22"
- name: Build the docs
run: |
CORE=$(realpath ${{ env.CORE }})
EXAMPLES=$(realpath ${{ env.EXAMPLES }})
cd ${{ env.DOCS }}
npm ci
CORE="$CORE" EXAMPLES="$EXAMPLES" npm run build
trigger-netlify:
if: github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Trigger Netlify Build
run: |
curl -X POST -d {} ${{ secrets.NETLIFY_BUILD_HOOK }}