Skip to content

Update descriptor_buffer.adoc #89

Update descriptor_buffer.adoc

Update descriptor_buffer.adoc #89

Workflow file for this run

# Copyright 2021 The Khronos Group, Inc.
# SPDX-License-Identifier: Apache-2.0
# Github workflow file for Antora documentation build
name: Antora Build
# Controls when the action will run.
on:
pull_request:
types: [ opened, synchronize, reopened ]
# Triggers the workflow on push or manual dispatch
push:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
antora-build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can
# access it
- uses: actions/checkout@v3
# Set up Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
# Install Antora CLI and site generator
- name: Install Antora
run: npm i -g @antora/cli@3.1 @antora/site-generator@3.1
# Setup Antora directory structure
- name: Setup Antora directory structure
run: |
make -f antora/Makefile setup
# Create a simple Antora playbook
- name: Create Antora playbook
run: |
echo "site:
title: Vulkan Guide
url: https://github.com/KhronosGroup/Vulkan-Guide
start_page: guide::index.adoc
content:
sources:
- url: .
start_path: antora
ui:
bundle:
url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable
snapshot: true" > antora-playbook.yml
# Run Antora build
- name: Build Antora site
run: |
# Run Antora and capture output and exit code
OUTPUT=$(antora --stacktrace antora-playbook.yml 2>&1)
EXIT_CODE=$?
# Print the output
echo "$OUTPUT"
# Check for errors or warnings in the output
# Look for patterns that indicate warnings or errors in Antora output
# Using a simpler approach to check for ERROR or WARN in the output
if [[ "$OUTPUT" == *"ERROR"* || "$OUTPUT" == *"WARN"* || "$OUTPUT" == *"WARNING"* ]]; then
echo "::error::Antora build produced errors or warnings. Failing the build."
exit 1
fi
# Also fail if the Antora command itself failed
if [ $EXIT_CODE -ne 0 ]; then
echo "::error::Antora build failed with exit code $EXIT_CODE"
exit $EXIT_CODE
fi
# Archive the build artifacts
- name: Archive Antora build
uses: actions/upload-artifact@v4
with:
name: antora-site
path: build/site