Skip to content

Refactor all build targets into top-level Makefile #32

Refactor all build targets into top-level Makefile

Refactor all build targets into top-level Makefile #32

Workflow file for this run

# Copyright 2021-2024 The Khronos Group, Inc.
# SPDX-License-Identifier: Apache-2.0
# Github CI file for Vulkan Antora Guide
name: CI
# Controls when the action will run.
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can
# access it
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- name: "checkout Antora UI"
uses: actions/checkout@v4
with:
repository: KhronosGroup/antora-ui-khronos
path: ./antora-ui-khronos
ref: main
submodules: recursive
- name: "checkout Vulkan Guide"
uses: actions/checkout@v4
with:
repository: KhronosGroup/Vulkan-Guide
path: ./Vulkan-Guide
ref: main
submodules: recursive
- name: "Checkout Vulkan Docs"
uses: actions/checkout@v4
with:
repository: KhronosGroup/Vulkan-Docs
path: ./Vulkan-Docs
ref: main
submodules: recursive
- name: "Checkout Vulkan Samples"
uses: actions/checkout@v4
with:
repository: KhronosGroup/Vulkan-Samples
path: ./Vulkan-Samples
ref: main
submodules: recursive
- name: "Checkout Vulkan Tutorial"
uses: actions/checkout@v4
with:
repository: KhronosGroup/Vulkan-Tutorial
path: ./Vulkan-Tutorial
ref: main
submodules: recursive
- name: "setup npm"
uses: actions/setup-node@v4
with:
node-version: 'latest'
cache: 'npm'
cache-dependency-path: docs-site/package-lock.json
- name: "force clear the npm cache"
run: npm cache clean --force
- name: "run npm install for ui bundle"
working-directory: antora-ui-khronos
run: npm install
- name: "run npm install for docs-site"
working-directory: docs-site
run: npm install
- name: "run npm install for Vulkan-Docs"
working-directory: Vulkan-Docs
run: npm install
- name: "ensure we have all dependencies for building/searching/highlighting"
run: |
sudo gem install rouge
sudo apt-get update
sudo apt install xorg-dev libglu1-mesa-dev
sudo apt-get install -y asciidoctor
pip install lxml
- name: "build the ui bundle"
working-directory: antora-ui-khronos
run: |
npx update-browserslist-db@latest
./node_modules/gulp/bin/gulp.js --version
./node_modules/gulp/bin/gulp.js bundle
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: ui-bundle.zip
path: antora-ui-khronos/build/ui-bundle.zip
retention-days: 5
- name: "copy ui-bundle.zip to vulkan-site"
run: cp antora-ui-khronos/build/ui-bundle.zip docs-site/
- name: "prepare tutorials"
working-directory: Vulkan-Tutorial/antora
run: |
make setup_tutorial
- name: "prepare repos with make"
working-directory: docs-site
run: make prepare_components
- name: "prepare samples"
working-directory: Vulkan-Samples
run: cmake -H"." -B"build/unix" -DVKB_GENERATE_ANTORA_SITE=ON
- name: "build (npx) with stacktrace"
working-directory: docs-site
run: |
npx antora antora-playbook.yml --stacktrace
touch build/site/.nojekyll
- name: 'Upload site artifact'
uses: actions/upload-artifact@v4
with:
name: fullSite
path: docs-site/build
retention-days: 5
- name: Publish to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs-site/build/site