wip: test build script in CI #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: defenseunicorns/pepr-docs | |
path: docs | |
- uses: actions/checkout@v4 | |
with: | |
repository: defenseunicorns/pepr | |
path: core | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: Get current defenseunicorns/pepr release | |
id: get_current_pepr_release_version | |
uses: pozetroninc/github-action-get-latest-release@master | |
with: | |
repository: defenseunicorns/pepr | |
excludes: prerelease, draft | |
- name: Build the docs! | |
run: | | |
DOCS=$(realpath ./docs) | |
SITE=$(realpath "$DOCS"/site) | |
CORE=$(realpath ./core) | |
cd "$DOCS" | |
npm ci | |
npm --workspace build run now -- --site "$SITE" --core "$CORE" |