Skip to content

Commit

Permalink
Fix placeholder docs workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCallow committed Feb 21, 2025
1 parent 9215376 commit 636ab33
Showing 1 changed file with 47 additions and 36 deletions.
83 changes: 47 additions & 36 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright 2025 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
name: Build and Deploy KTX-Software Reference Pages and Documentation
name: Build and Deploy Reference Pages and Other Documentation

# Ensure documentation builds on all platforms. Deploy from the Ubuntu build.

on:
# Trigger the workflow on a pull request,
Expand All @@ -17,6 +19,12 @@ on:
- 'v[0-9]+.[0-9]+.[0-9]+-*'
paths-ignore:
- .appveyor.yml
- .github/workflows/android.yml
- .github/workflows/check-mkvk.yml
- .github/workflows/formatting.yml
- .github/workflows/mingw.yml
- .github/workflows/publish-pyktx.yml
- .github/workflows/windows.yml
- .travis.yml
- README.md
- CODE_OF_CONDUCT.md
Expand All @@ -42,24 +50,23 @@ jobs:
runs-on: ${{ matrix.os }}

env:
BUILD_DIR: build
GIT_LFS_SKIP_SMUDGE: 1
BUILD_DIR: "build"

steps:
- uses: actions/checkout@v4
# with:
with:
# Fetch all history to make sure tags are
# included (used for version creation)
# fetch-depth: 0
fetch-depth: 0

- name: Install Doxygen and Graphviz on macOS
if: matrix.os == 'macos-latest'
run: brew install doxygen
run: brew install graphviz
run: brew install --formula doxygen && brew install --formula graphviz && echo "Doxygen version $(doxygen --version)"

- name: Install Doxygen and Graphviz on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: apt-get install-y doxygen graphviz
run: sudo apt-get install -y doxygen graphviz && echo "Doxygen version $(doxygen --version)"

- name: Install Doxygen and Graphviz on Windows
if: matrix.os == 'windows-latest'
Expand Down Expand Up @@ -95,6 +102,9 @@ jobs:
if (-not ((Install-WithChoco doxygen.install) -and (Install-WithChoco graphviz))) {
exit 1
}
Import-Module "$env:ChocolateyInstall/helpers/chocolateyInstaller.psm1"
refreshenv
echo "Doxygen version $(doxygen --version)"
- name: Smudge dates (macOS and Ubuntu)
if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'
Expand All @@ -106,36 +116,37 @@ jobs:

- name: Build docs
run: |
cmake -B ${{ env.BUILD_DIR }} -D KTX_FEATURE_TESTS=OFF -DKTX_FEATURE_TOOLS=OFF
cmake --build ${{ env.BUILD_DIR}} --target all.doc
cmake -B ${{ env.BUILD_DIR }} -D KTX_FEATURE_DOC=ON -D KTX_FEATURE_TESTS=OFF -D KTX_FEATURE_TOOLS=OFF
cmake --build ${{ env.BUILD_DIR }} --target all.doc
- name: Upload generated files for GitHub Pages
- name: Upload generated HTML documentation for GitHub Pages
if: matrix.os == 'ubuntu-latest'
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: ${{env.BUILD_DIR}/docs

deploy:
name: Deploy to GitHub Pages
# Add a dependency to the build job
needs: build-docs
# Only deploy when building `main`.
if: github.ref == 'refs/heads/main'

runs-on: ubuntu-latest

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Specify deployment step
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
path: ${{ env.BUILD_DIR }}/docs/html

# deploy:
# name: Deploy to GitHub Pages
# # Add a dependency to the build job
# needs: build-docs
# # Only deploy when building `main`.
# if: github.ref == 'refs/heads/main'
#
# runs-on: ubuntu-latest
#
# # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
# permissions:
# pages: write # to deploy to Pages
# id-token: write # to verify the deployment originates from an appropriate source
#
# # Deploy to the github-pages environment
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
#
# # Specify deployment step
# steps:
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v4

0 comments on commit 636ab33

Please sign in to comment.