Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Antora ci #1046

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
93 changes: 93 additions & 0 deletions .github/workflows/build-Antora-doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: "build Antora documentation"

on:
workflow_dispatch:
pull_request:
types: [ opened, synchronize, reopened ]
push:
branches: [ main ]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can
# access it
- uses: actions/checkout@v3
with:
submodules: "recursive"
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'

- name: "Checkout Vulkan-Site"
uses: actions/checkout@v3
with:
# repository: KhronosGroup/Vulkan-Site
repository: gpx1000/Vulkan-Site
path: ./Vulkan-Site
# ref: main
ref: parent-ci
submodules: recursive

- name: "Checkout antora ui"
uses: actions/checkout@v3
with:
repository: KhronosGroup/antora-ui-khronos
path: ./Vulkan-Site/antora-ui-khronos
ref: main

- name: "setup npm"
uses: actions/setup-node@v3
with:
node-version: 'latest'
cache: 'npm'
cache-dependency-path: ./Vulkan-Site/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: ./Vulkan-Site/antora-ui-khronos
run: npm install

- name: "run npm install for docs-site"
working-directory: ./Vulkan-Site/docs-site
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: ./Vulkan-Site/antora-ui-khronos
run: |
npx update-browserslist-db@latest
./node_modules/gulp/bin/gulp.js --version
./node_modules/gulp/bin/gulp.js bundle

- name: "copy ui-bundle.zip to vulkan-site"
run: cp ./Vulkan-Site/antora-ui-khronos/build/ui-bundle.zip ./Vulkan-Site/docs-site/

- name: "prepare samples"
run: cmake -H"." -B"build/unix" -DVKB_GENERATE_ANTORA_SITE=ON

- name: "build (npx) with stacktrace"
working-directory: ./Vulkan-Site/docs-site
run: |
npx antora antora-parent-ci-playbook.yml --stacktrace
touch build/site/.nojekyll

- name: Publish to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./Vulkan-Site/docs-site/build/site
1 change: 1 addition & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,4 @@ jobs:
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.1
continue-on-error: true # we currently don't track pre-commit warnings as errors. in the future this will change. for this step to pass we will need to run `pre-commit run --all-files`

Loading