Skip to content

Force build to fail on Docusaurus plugin exceptions #82

Force build to fail on Docusaurus plugin exceptions

Force build to fail on Docusaurus plugin exceptions #82

Workflow file for this run

name: PullRequestCI
env:
# Force the stdout and stderr streams to be unbuffered
PYTHONUNBUFFERED: 1
on: # yamllint disable-line rule:truthy
pull_request:
types:
- synchronize
- reopened
- opened
# Cancel the previous wf run in PRs.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
DocsCheck:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20' # Adjust Node.js version as needed
cache: 'yarn' # Cache yarn dependencies
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
id: build
continue-on-error: true
run: |
CI=false yarn build # CI=false here as copy-clickhouse-repo-docs uses it as a flag to not look for ClickHouse repo locally but rather pull the repo
echo "::set-output name=exit_code::$?"
- name: Check for validation failures
run: |
FAILED=false
if [ -f "frontmatterValidationFailed" ]; then
echo "::error::Frontmatter validation failed"
FAILED=true
fi
if [ -f "floatingPageValidationFailed" ]; then
echo "::error::Floating pages validation failed"
FAILED=true
fi
if [ "$FAILED" = true ]; then
exit 1
fi