Skip to content

Commit

Permalink
Create build-docs.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Collins <[email protected]>
  • Loading branch information
benmcollins authored Jan 4, 2025
1 parent 9cb4aff commit f6960a0
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: LibJWT Documentation

on:
push:
tags:
- v*
branches:
- "testing-builds"
paths:
- include/jwt.h
- doxygen/*

jobs:
build:
if: ${{github.ref == 'refs/heads/master'}}
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: ConorMacBride/install-package@v1
with:
brew: gnutls openssl@3 jansson pkgconf cmake doxygen graphviz

- name: Generate documents
run: |
mkdir -p gh-pages
cmake -B build
make -C build doxygen-doc
mv build/doxygen-doc/html gh-pages/HEAD
rm -rf build
git checkout $(git describe --tags --abbrev=0)
cmake -B build
make -C build doxygen-doc
mv build/doxygen-doc/html/* gh-pages/
- name: Upload pages
id: deployment
uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action
with:
path: gh-pages/

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit f6960a0

Please sign in to comment.