Skip to content

Commit

Permalink
Antora ci (KhronosGroup#1046)
Browse files Browse the repository at this point in the history
* Update check.yml

* Add VK_EXT_shader_object sample

* run antora from the CI and build a site.

* we stopped using submodules sadly, take that into account in the CI script.

* This version should work to build antora doc site for samples only and only for samples CI.

* Update build-Antora-doc.yml

see if granting permissions in the workfile solves issue.

* Update build-Antora-doc.yml

*maybe* this will let us use the existing environment for deploying?

* Update build-Antora-doc.yml

* Update build-Antora-doc.yml

* Update build-Antora-doc.yml

* Update build-Antora-doc.yml

* Update build-Antora-doc.yml

* Update build-Antora-doc.yml

* Update build-Antora-doc.yml

* Update build-Antora-doc.yml

* Update build-Antora-doc.yml

Turn off deployment to github pages from the CI until I can figure out how to get the khronos repository to accept the pages artifact uploads.

* Update .github/workflows/build-Antora-doc.yml

Co-authored-by: Jon Leech <[email protected]>

---------

Co-authored-by: Coleman Jonas <[email protected]>
Co-authored-by: Jon Leech <[email protected]>
  • Loading branch information
3 people authored Nov 4, 2024
1 parent 16c462a commit bc61227
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 0 deletions.
103 changes: 103 additions & 0 deletions .github/workflows/build-Antora-doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
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 stacktrmainace"
working-directory: ./Vulkan-Site/docs-site
run: |
npx antora --log-failure-level=error antora-parent-ci-playbook.yml --stacktrace
touch build/site/.nojekyll
# Deployment job
# deploy:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
# permissions:
# contents: write
# runs-on: ubuntu-latest
# needs: build
# steps:
# - name: Deploy to GitHub Pages
# id: deployment
# uses: peaceiris/actions-gh-pages@v4
# 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 @@ -111,3 +111,4 @@ jobs:
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
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`

0 comments on commit bc61227

Please sign in to comment.